APIs & Integrations

Non applicable

Oauth Token does not have proper permissions Issue

Résolue

Hi,

I am trying to get the list of blog posts from the HubSpot API and I get the following error -

(403) This oauth-token does not have proper permissions! (requires all of [content-access])

There is scope sent in the URL for Oauth creation -

scope=contacts&optional_scope=content%20reports%20social%20timeline%20business-intelligence

You will notice the content scope is already present in it.

Can you please let me know what else is required here?

0 Votes
1 Solution acceptée
dhirajpandey
Solution
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Oauth Token does not have proper permissions Issue

Résolue

Hi @Kalyani, according to the same document that @Isaac_Takushi pointed out -
" Optional scopes will be automatically dropped from the authorization request if the user selects a HubSpot account that does not have access to that tool (such as requesting the social scope on a CRM only portal). If you're using optional scopes, you will need to check the access token or refresh token to see which scopes were granted."
You can check where things aren't working as they should.

Voir la solution dans l'envoi d'origine

7 Réponses
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

Résolue

Sounds good, @Kalyani! I look forward to hearing back from you.

Isaac Takushi

Associate Certification Manager
0 Votes
Non applicable

Oauth Token does not have proper permissions Issue

Résolue

Hi Issac and Dhiraj,

Thanks for the input. I am working with one of our customers, I don't really have access to their details.
Let me investigate this further on my end and back to you with more details.

Thanks!

0 Votes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

Résolue

Hey, @Kalyani.

@dhirajpandey is correct. There are other factors at play than just including the scope in either the scope or optional_scope parameters. That's why I asked for the Hub ID you are attempting to connect to.

Could you also share:

  1. The name of the user who is trying to connect your app. (I'll want to check their permissions in the account.)
  2. The results of this endpoint (but do not include the token value)? We're looking for content in the scopes array.

Isaac Takushi

Associate Certification Manager
0 Votes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

Résolue

Welcome, @Kalyani.

The scopes your app requests in the scope and optional_scope parameters aren't necessarily the scopes that the OAuth token can access (especially when dealing with an optional_scope).

What is the Hub ID of the account throwing this error? Per this documentation, only accounts with paid Marketing Hub subscriptions have content access.

Isaac Takushi

Associate Certification Manager
0 Votes
Non applicable

Oauth Token does not have proper permissions Issue

Résolue

Thanks Isaac, but the same query with the API key authentication works fine. Thats why I am confused.

0 Votes
dhirajpandey
Solution
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Oauth Token does not have proper permissions Issue

Résolue

Hi @Kalyani, according to the same document that @Isaac_Takushi pointed out -
" Optional scopes will be automatically dropped from the authorization request if the user selects a HubSpot account that does not have access to that tool (such as requesting the social scope on a CRM only portal). If you're using optional scopes, you will need to check the access token or refresh token to see which scopes were granted."
You can check where things aren't working as they should.

dhirajpandey
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Oauth Token does not have proper permissions Issue

Résolue

Have you tried putting "content" in scope instead of optional_scope?

0 Votes