Missing Scope in APIs

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: Scopes - HubSpot docs”,
“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”: “Working with OAuth - HubSpot docs
},
“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.

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