Send the authorization response
Follow these steps to redirect the user back to the Alexa app. To redirect the user back to the Alexa app- Construct the response by using the Alexa app redirect URI that the Alexa service provided in the authorization request.
- Append the query parameters defined by the specification to the Alexa app redirect URI.
- Open the redirect URI. The provided Alexa app redirect URI is a Universal Link or App Link that sends the user to the Alexa app when opened.
Success response
The following example shows a successful authorization response URI for an authorization code grant. The authorization response parameters are query parameters.Error response
If the user denies the request or there’s an error obtaining the grant, you must redirect the user back to the Alexa app with the appropriate OAuth2 error response. The following example shows an error response URI for an authorization code grant.iOS example
The following example shows how to redirect the user back to the Alexa app by using theUIApplication.shared.open Swift library after you construct the response URI.
Android example
The following example shows how to redirect the user back to the Alexa app by using the AndroidIntent.ACTION_VIEW after you construct the response URI.

