APIs & Integrations

George_Hu
Member

Keep getting BAD_SCOPES error when trying to get access token

Originally I was using this URL to get the authorization code:
https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxxxxx&scope=contacts%20content%20reports%20social%20automation%20forms%20files&redirect_uri=https://www.hubspot.com
I was able to get the access token and refresh token before. I kept the refresh token and used it to refresh a new access token every time I tried to connect.

Lately, when I tried to refresh token I got a BAD_SCOPES error:
{ "status": "BAD_SCOPES", "message": "missing or invalid scopes", "correlationId": "a050d786-1014-4dc4-ae6d-b3c1d08997e9", "requestId": "3a4097491fcd6f5ec8396d0575a063e8" }

I tried with the scopes I was using to get access token again, but it also failed with BAD_SCOPES error.
I have also tried different scope combination but I keep getting BAD_SCOPES error.
I haven't notice any change in scope names from api documentation.

One more thing to mention: I have two accounts and only this one is getting BAD_SCOPES error, but the other works fine with exactly the same scopes.

Any help is appreciated.

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Keep getting BAD_SCOPES error when trying to get access token

Hi @George_Hu,

Can you direct message me your client id and the hub ids of both portals you're installing the app to (i.e. the one that succeeds, and the one that returns BAD_SCOPES)?

0 Upvotes