I have the following scopes set on my Private App.
crm.objects.contacts.writecrm.objects.leads.readcrm.objects.contacts.readcrm.objects.leads.write
Using crm.objects.contacts.read works.
Using crm.objects.leads.read doesn’t. I get this error message, which I’m sure many have seen before.
{"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":"96b40eaa-072c-4a23-8cfc-4a8aab6cc761","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 addedcontacts scopes just to see if I could successfully call the API.
Just in case people are wondering, we are using a paid version of HubSpot. Our account has the Service Hub Professional and Marketing Hub Starter subscriptions.
Hey, @helloimjohn
Using Postman or the on-page example from the docs, can you share an example request and response, please? That information can help our community members to troubleshoot along with you.
Best,
Jaycee
Hey @Jaycee_Lewis , thanks for the response. Here’s the request.
GET /crm/v3/objects/leads HTTP/1.1
Authorization: Bearer <API-KEY>
Content-Type: application/json
Host: api.hubapi.com
Connection: close
User-Agent: RapidAPI/4.2.7 (Macintosh; OS X/14.6.1) GCDHTTPRequest
Here’s the response:
HTTP/1.1 403 Forbidden
Date: Wed, 27 Nov 2024 21:51:07 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 456
Connection: close
CF-Ray: 8e955679fb1c4245-EWR
CF-Cache-Status: DYNAMIC
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: origin
access-control-allow-credentials: false
x-content-type-options: nosniff
x-hubspot-correlation-id: a1631af8-b617-4f10-9be5-83e7cc8652c7
x-hubspot-ratelimit-daily: 625000
x-hubspot-ratelimit-daily-remaining: 621348
x-hubspot-ratelimit-interval-milliseconds: 10000
x-hubspot-ratelimit-max: 190
x-hubspot-ratelimit-remaining: 189
x-hubspot-ratelimit-secondly: 19
x-hubspot-ratelimit-secondly-remaining: 18
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=q5dryF%2B9zQsktMJjv7WmW%2FGbVB4kwkl8itHL1Y3HxYqk5WnGd02%2FmQW3mTN32l9WCnwrRPH3n2N5ItGSZpSEH7ZUNJJMpLz2L%2FfnHYys7DvTtvhW4xEgguZrtGTe0ABY"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
{"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":"a1631af8-b617-4f10-9be5-83e7cc8652c7","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"}
Hope this helps