Lead API

I’m currently testing leads API:

curl --request GET \
--url ‘https://api.hubapi.com/crm/objects/2026-03/leads?limit=10’ \
--header 'Authorization: Bearer pat-eu1-xxxxxxxxxxxxxxxxxxxxxxxx
{“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”:“019dda13-44bd-7a69-83f4-9954dcd19686”,“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”}

These are the the scopes that I set to the service key:

crm.objects.companies.read
crm.objects.companies.write
crm.objects.deals.read
crm.objects.deals.write
crm.objects.leads.read
crm.objects.leads.write

Am I missing something here? Or is error message misleading?

Hey @DumDumXXX,

Welcome to the Community!

To start, it looks like you have the required scopes seen in our doc on the matter:

With help Dev Docs assistant: It looks like you’re using a private app access token. Are you able to make sure the scopes are configured on the private app whose token you’re using, not a different one, and that you’re using the latest token after saving scope changes?
I’d also like to tag in some of our Top Contributors to see if they have any notice anything about your request:

Hey @evaldas, @Anton, @GRajput -- Do you have any suggestions for @DumDumXXX on this?

Thanks in advance!

Sam, Community Manager

I’m not very familiar with HubSpot terminology, but I assume you were referring to legacy (private) apps. I’m not using a legacy app — I’m using a service key (BETA).

I was able to list company and deal objects without any issues.
I deleted the original key and created a new one with the same scopes. Both keys behaved the same way: listing companies and deals worked as expected, but listing deals failed.

I also removed the company scopes to verify the behavior. The API returned the expected unauthorized error, which indicates that updating scopes works correctly.

I then tried to create a new service key with all CRM scopes selected. The UI returned the following error:

“Something went wrong while creating your service key. Please try again or contact support.”

That is weird. I created a new Service Key in my account and ONLY gave it crm.objects.leads.read and the GET request went through fine.

Can you go to the Service Key and click View Logs. This should log all the requests that went through the key. If there is an error, it should show the error message in the details. Is it listed there? Is there more info in the logs that could help?

Do you have Sales Hub Professional or Enterprise?

Hi MichaelMa,

Error message seems to be the same that was in the original post: I don’t have either professional or enterprise. I have just created a developer account that I have used for testing.

{“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”:“019dda4f-2af4-7ff6-a1f8-f052652debc8”,“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 can reproduce the error in my Develop account but Developer accounts don’t have access to the Lead object. If your first account doesn’t have Sales Professional or Enterprise, you don’t have access to the Leads object or hasn’t been enabled.

You can check if you have access to the object via the Settings → Data Management → Objects → Find Leads object. If it’s not there, then your account doesn’t have access to it. If it is there, make sure it’s enabled.

You likely need to have your Developer account create some test accounts (Development → Testing → Test Accounts) with the necessary subscriptions to have leads enabled.

Creating a test account worked :+1: Now deals API is working.

I created second develoloper account + service key. Still behaving the same way. Leads not working :neutral_face:. So it’s not account related.