When using OAuth, getting error saying I don't have permission


I am using https://app.hubspot.com/oauth/authorize?client_id=xxxxxxx&scope=contacts%20automation&redirect_uri=https://dnsname

But when the list of accounts are given and I choose one, I get the message saying:

Uh oh!

You do not have the correct role to grant these permissions. Please contact your administrator.

I have administrator privileges and so not sure how to set this up now.


@ss_integration you’ll also see that error message if you’re trying to authorize an account that doesn’t have access to the scopes you’re requesting. Is the portal you’re working with a free CRM portal? Those portals wouldn’t have access to workflows or the automation scope.


Thank you @dadams. We have test portal which we want to use for testing the workflow before moving it to the production portal. We did it before but now it is not allowing use to do. Can you please let us know what I need to do if I have test out side of the production portal.


Can you please let us know if we can test outside of the production portal as we used to do before?


I removed automation and then tried it with just contacts. I got the redirect with the code after I authorized.

After that I took the code and followed the procedure at http://developers.hubspot.com/docs/methods/oauth2/get-access-and-refresh-tokens

But I got the following error:

“message”: “internal server error”,
“correlationId”: “e567f7e1-0092-475c-9223-781868eccaf2”,
“requestId”: “2396ee2ed884334742f4d5754f9bb0b1”

I dont see any application installs in my test application. Please let me know if there is anything else that I need to do?


@ss_integration the application won’t actually count as installed until you generate the first access token.

Do you have any other details for the request you’re making to get the access and refresh tokens (without sharing the client ID or secret)? The endpoint used to get the tokens will generally give you a human readable error message in the response so I’d need to know more about the request you’re making.


I used the post request to https://api.hubapi.com/oauth/v1/token with the following parameters in post body -

client_id: yyyyyyyyyyy
client_secret: zzzzzzzzzzzzzzz