missing or unknown auth code

Unfortunately again “generic post” with “missing or unknown auth code” message

Parameters are

grant_type=authorization_code

client_id=925f1e4d-6b12-4051-9bda-XXXXX

client_secret=ef196987-2318-4993-a2e5-XXXXX

code=336edf0e-b80a-4065-abee-XXXXX

redirect_uri=https://www.kXXXXX

the code is what I got after app authorisation

I can see the app is installed on the client’s portal - so the code is correct. But for every post request I get
{“status”:“BAD_AUTH_CODE”,“message”:“missing or unknown auth code”,“correlationId”:“db861fc3-6340-4a87-a8a5-f88b5545eea8”}

Any idea? I tried removing and adding again the app, the same error

Just an update on the issue. So I removed the app and reinstalled it again.

I ran a post via postman and it was successful, I got the token and the app is now visible in my HubSport’s instance

but as soon as I tried to rerun the same request I got again the same error message

{

“status”: “BAD_AUTH_CODE”,

“message”: “missing or unknown auth code”,

“correlationId”: “efe92aee-d1c9-408e-b85e-51fbcecd7837”

}

To reply me and hopefully help someone else :slightly_smiling_face:

https://api.hubapi.com/oauth/v1/token with grant_type=authorization_code you can run only once, if you try again you will get the error message above

The whole point of running this is to get the refresh token, that is the token you need to save and use for getting the authorisation token in future