You do not have the correct role to grant these permissions


#1

Whenever I am trying to get access token using code and following URL i am getting error for incorrect role. I am using developer test portal with Admin roles. can anyone help with this ?

POST URL:
https://api.hubapi.com/oauth/v1/token
Headers:
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Data:
grant_type=authorization_code&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&client_secret=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy&redirect_uri=https://www.example.com/&code=zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz


#2

Also facing You don’t have permission to access “http://api.hubapi.com/oauth/v1/token/” exception


#3

Hi @Bhojraj_Bendale

If you’re logged in as an administrator, and you’re seeing that message, it usually means that the scopes you’re requesting are not supported by the HubSpot account you’re trying to authorize. As an example, if you’re working with an account that only has access to the Sales tools and CRM, you won’t be able to authorize the content scope (there’s a full list of scopes and the account types supported by the scopes here)

Can you give me some more information on the scopes you’re requesting when you authorize the app?


#4

Hi Derek,
I am using scope as contacts automation while authorizing the app.