APIs & Integrations

ETaylor75
Colaborador

Creating Custom Objects

I am trying to create a custom object using the site https://developers.hubspot.com/docs/api/crm/crm-custom-objects. I am using the “Create a new schema” section. I have filled out the required fields and applied the script it generated using our sandbox API. Below is the script the site generated minus the sandbox API key. This keep failing with the 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", "All of the following scopes are required". Below is the error message in full.

curl --request POST \
--url 'https://api.hubapi.com/crm/v3/schemas?hapikey={Sandbox API key}' \
--header 'content-type: application/json' \
--data '{
"labels": {
"singular": "Dealer Agreement",
"plural": "Dealer Agreements"
},
"requiredProperties": [
"name"
],
"searchableProperties": [
"name"
],
"secondaryDisplayProperties": [
"status"
],
"properties": [
{
"name": "name",
"label": "Name",
"isPrimaryDisplayLabel": true,
"type": "string",
"fieldType": "text"
},
{
"name": "status",
"label": "Status",
"type": "string",
"fieldType": "text"
}
],
"associatedObjects": [
"COMPANY"
],
"name": "dealer_agreement",
"primaryDisplayProperty": "name",
"metaType": "PORTAL_SPECIFIC"
}'

 

------------------------------------------

{
"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": "e7fac4c5-4495-4bb7-9ca0-4edd2a8a0726",
"errors": [
{
"message": "All of the following scopes are required.",
"context": {
"requiredScopes": [
"crm.objects.custom.write"
]
}
}
],
"links": {
"scopes": "https://developers.hubspot.com/scopes"
},
"category": "MISSING_SCOPES"
}

0 Me gusta
3 Respuestas 3
dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Creating Custom Objects

@ETaylor75 

Did you post this using postman or equivalent? 

 

0 Me gusta
ETaylor75
Colaborador

Creating Custom Objects

I just tried to use postman and I got the same error. I am missing a required object somewhere I just do not know which one. I made sure I have filled in the data that has a *.

0 Me gusta
ETaylor75
Colaborador

Creating Custom Objects

0 Me gusta