APIs & Integrations

Não aplicável

Oauth Token does not have proper permissions Issue

resolver

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 Avaliação positiva
1 Solução aceita
dhirajpandey
Solução
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Oauth Token does not have proper permissions Issue

resolver

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.

Exibir solução no post original

7 Respostas 7
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

resolver

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

Isaac Takushi

Associate Certification Manager
0 Avaliação positiva
Não aplicável

Oauth Token does not have proper permissions Issue

resolver

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 Avaliação positiva
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

resolver

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 Avaliação positiva
IsaacTakushi
HubSpot Employee
HubSpot Employee

Oauth Token does not have proper permissions Issue

resolver

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 Avaliação positiva
Não aplicável

Oauth Token does not have proper permissions Issue

resolver

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

0 Avaliação positiva
dhirajpandey
Solução
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Oauth Token does not have proper permissions Issue

resolver

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
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Oauth Token does not have proper permissions Issue

resolver

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

0 Avaliação positiva