tkw722 avatar image
tkw722 asked

"Invalid Grant Parameter: redirect_uri" on Product Authenticating For AVS

Hi All, Back again, with some further progress but still stuck. I am writing a Swift iOS app that acts as the companion app to a device that will be interacting with the Alexa Voice Service. I believe I have the iOS side correctly authenticating and retrieving a valid authorization code. The app passes the authorization code to the device and then the device makes a REST call to the OAuth endpoint to trade it for the access token. This is where I'm running into a problem. When making a call to the OAuth endpoint, I get the response: { error_description : The request has an invalid grant parameter : redirect_uri, error : invalid_grant } I have followed the instructions defined in "" and it states to retrieve the redirect_uri by calling [AIMobileLib getRedirectUri]. Based on what I've read elsewhere it seems that the redirect_uri should match the original one used to retrieve the authorization code. It's my assumption that [AIMobileLib getRedirectUri] returns that. Regardless, in the situation where a separate device is trading the auth code for the access token, a redirect_uri doesn't seem to make sense. Has anyone else run into this? What's the correct content to submit for this field when a separate device is being authenticated? Any help would be greatly appreciated! Thanks, Tim
login with amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jamie Grossman avatar image
Jamie Grossman answered
Hi there, I've looked into this issue, but I'm still not 100% on what is going on. Before passing it on to the relevant team, were you able to solve this issue in the end? Thanks! Jamie
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.