APIs & Integrations

SSoftware2
Member

Missing Scope in APIs

SOLVE

Hello,

 

I created a private app and I am trying to hit the Leads APIs. But, I am getting the following number

 

API:

curl --request GET \
--url 'https://api.hubapi.com/crm/v3/objects/leads?limit=10&archived=false' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'

 

Error:

HTTP 403

{
"status": "error",
"message": "This app hasn't been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",
"correlationId": "4551aac3-5eaa-4a3e-99ac-b15b3fbe922a",
"errors": [
{
"message": "One or more of the following scopes are required.",
"context": {
"requiredGranularScopes": [
"crm.objects.leads.read"
]
}
}
],
"links": {
"scopes": "https://developers.hubspot.com/scopes"
},
"category": "MISSING_SCOPES"
}

 

I am getting this error despite the scopes being set. I am getting this error through the test call in the reference guide and also through Postman.image.png

0 Upvotes
1 Accepted solution
GiantFocal
Solution
Top Contributor | Gold Partner
Top Contributor | Gold Partner

Missing Scope in APIs

SOLVE

Hi @SSoftware2,

 

If your authentication lacks the permissions for that API endpoint, you will get a 403 Forbidden error. This common issue can occur even when scopes appear to be correctly set. 

 

To fix it, you can do the following:

  1. Verify that your private app has explicitly been granted the "crm.objects.leads.read" scope
  2. Ensure you're using the correct access token that corresponds to your configured scopes
  3. Check if your HubSpot account type has access to the Leads API functionality
Best regards,
Ernesto @ GiantFocal
Found this answer helpful?
Marking it as the solution helps both the community and me - thanks in advance!

View solution in original post

0 Upvotes
1 Reply 1
GiantFocal
Solution
Top Contributor | Gold Partner
Top Contributor | Gold Partner

Missing Scope in APIs

SOLVE

Hi @SSoftware2,

 

If your authentication lacks the permissions for that API endpoint, you will get a 403 Forbidden error. This common issue can occur even when scopes appear to be correctly set. 

 

To fix it, you can do the following:

  1. Verify that your private app has explicitly been granted the "crm.objects.leads.read" scope
  2. Ensure you're using the correct access token that corresponds to your configured scopes
  3. Check if your HubSpot account type has access to the Leads API functionality
Best regards,
Ernesto @ GiantFocal
Found this answer helpful?
Marking it as the solution helps both the community and me - thanks in advance!
0 Upvotes