Creating Authorization request to a previously deauthorizated app returning invalid auth code

We have an app in the app store, that when trying to authorize is returning us an invalid authorization code.

The flow in which we have tried is:

  • deauth app from app store
  • try to reauth the application{OUR_CLIENT_ID}&redirect_uri=https://OUR_URL
  • get a successful response with an authorization code
  • attempt to get a token from /oauth/token using the authorization code we recieved
  • get back an error { reason: 'Invalid authorization code {AUTH COIDE}', error: 'invalid_request' }

Which App Type (OAuth / Chatbot / JWT / Webhook)?

Which Endpoint/s?

Additional context
We have tested this with a couple of different accounts

one is a client’s account which is giving us the above error
the other is our account which is working.

we have tried on both to remove the authorized app by going to the market place finding our app and then going through the uninstall process.

the only difference we can see right now is that the account we auth with on our account is an “admin” and the client is an “owner”

but what doesnt seem to make sense is that the Oauth flow to get the authorization token is successful, it returns us an authorization code, its then the following call to get the token.

I have read in some other posts about that the authorization code is only valid once, and is a one time thing and to get a new one you have to remove and re auth, but we are doing that so a little lost at this point.

Any hints would be great.

Hey @abennett,

Thank you for reaching out about this. In order to take a closer look at your exact authorization flow, can I kindly ask that you share the following details with us at

  • Client ID for your app
  • Authorization URL being used
  • Example successful token
  • Example token that throws “invalid authorization code”

This will help to further investigate for you. Please reference this thread in your email.


Sure @will.zoom ill ping the details over now.

Thanks, @abennett—we will be in touch shortly.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.