Hi,
I'm currently developing a ruby gem called delivery_api to wrap the delivery api calls for a RoR application. I'm having trouble with the authentication step of my oauth process. I'm receiving the following error:
invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. Check the "code" parameter.
I've double checked my redirect urls inside of the sandbox dashboard to insure they are correct.
My request is going to the following url:
Passing the following params through a POST request:
{
code: "token returned from /third_party/authorize"
client_id: "my-client-id",
client_secret: "my-client-secret",
grant_type: "authorization_code",
}
I've read online that the invalid_grant error is returned when my application has already been issued a valid access_token for a specific user login. If this is the case then if my application was throwing routing errors for example, its possible that i never saw the access_token object get returned and I wasn't able to temporarily store the object.
Is there a way to manually expire these tokens from my sandbox dashboard. If not can the ability to expire/remove them be added for sandbox accounts. I think this would help out other developers that run into this issue in the future. As of now I can continue working on other portions of the app, but I have to wait an hour for an issued access_token to expire while I'm working out the storage logic and procedures within the gem.
I wanted to make sure I am understanding this error correctly. It basically means get it right the first time or I'm screwed...