Hi HubSpot Community,
I’m currently facing an issue while trying to update a record of a custom object via the HubSpot API using a PATCH request.
Here’s the request endpoint:
PATCH https://api.hubapi.com/crm/v3/objects/{objectType}/{recordID}
And the response I receive is:
{
“status”: “error”,
“message”: “The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”,
“correlationId”: “8ea52f12-3481-41f2-9c89-7e3df4c6f615”,
“links”: {
“support”: “https://help.hubspot.com/”,
“forum”: “https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations”
},
“category”: “MISSING_SCOPES”
}
We’ve already added the following scopes in our OAuth configuration:
- object.custom.read
- object.custom.write
- object.schema.customs.read
Yet, this error still appears.
Also the API endpoint
Calls to https://api.hubapi.com/crm/v3/schemas still succeed.
Important data points
- Both the above calls use the same access token
- Scopes for this private app haven’t changed, and include crm.objects.custom.writecrm.objects.custom.read
Has anyone faced this issue before or knows whether PATCH access to custom objects requires an additional scope or has some limitations?
Any guidance or suggestions would be greatly appreciated!
I really appreciate any help you can provide.
Noor
Are you updating any sensitive fields? You may need to add the crm.objects.custom.sensitive.write or crm.objects.custom.highly_sensitive.write permissions.
In most cases, the error should return what scopes you’re missing. Are you able to check the logs in Hubspot for the error? Usually, there is an context message stating the missing scopes.
An example of what I normally receive if I’m missing scopes.
{
"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": "17e2abff-3aad-4ec9-966a-2b23ac8bb810",
"errors": [
{
"message": "One or more of the following scopes are required.",
"context": {
"requiredScopes": [
"crm.objects.custom.read",
"crm.schemas.custom.read"
]
}
}
],
"links": {
"scopes": "https://developers.hubspot.com/scopes"
},
"category": "MISSING_SCOPES"
}
@MichaelMa But in another test account, I have been updating the same property using another Hubspot Acess Token I’m able to update the properties.
And I would like to add that it is not only concerning POST or PATCH Request but for the GET Request I’m getting the same error as shown in the Image
replaced the sensitive information
Also just going through the Community I found certain solutions but cannot be 100 percent sure that those fixes would work
here is some
https://community.hubspot.com/t5/APIs-Integrations/Custom-Object-endpoints-give-403-forbidden/m-p/918247
Are you building an app using OAUTH as the authentication method? Did you update the scopes AFTER you installed the app on your hub? If so, you need to update/reinstall the app with the new scopes, I believe.
Do you have sensitive fields in your hub? You may need those scopes if you’re updating them.