APIs & Integrations

annapurna
Participant

Access token has all necessary scope but still getting permission error

Hi,

We are calling following endpoint

https://api.hubapi.com/marketing-emails/v1/emails?limit=250&offset=0

And we get the following error

 

{
"correlationId": "REMOVED",
"message": "This oauth-token (REMOVED) does not have proper permissions! (requires any of [content-core-api-access])",
"requestId": "REMOVED",
"status": "error"
}

But when I check the scopes for the token by calling 

https://api.hubapi.com/oauth/v1/access-tokens/{ACCESS_TOKEN_USED_TO_MAKE_REQUEST}
 

I get following 
{
"token": "REMOVED",
"user": "REMOVED",
"hub_domain": "REMOVED",
"scopes": [
"contacts",
"content",
"business-intelligence",
"oauth",
"forms",
"tickets",
"sales-email-read"
],
"scope_to_scope_group_pks": [REMOVED],
"hub_id": REMOVED,
"app_id": REMOVED,
"expires_in": 13552,
"user_id": REMOVED,
"token_type": "access"
}

 It means that the token has the content scope which is required for calling marketing API. Could you please guide me what is missing here?

0 Upvotes
2 Replies 2
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Access token has all necessary scope but still getting permission error

Hello there,

It seems that either the HubSpot portal authorized on this access token has been removed or the user who done the oauth process has been deleted.

Can you retry to Authorize the app with HubSpot portal and re get the new tokens.

Thanks
Digital Marketing & Inbound Expert In Growth Hacking Technology
0 Upvotes
annapurna
Participant

Access token has all necessary scope but still getting permission error

Hi,

Thank you for your answer. Would it be easy to investigate this with requestId? We need to give correct instructions to end-user on how they can fix this.

 

For example requestID: 8f3df27f-d07e-438e-bda1-bcf29d396a19 

 

0 Upvotes