The scope needed for this API call isn't available for public use.

I’m tring to use /crm/v3/schemas this api but getting this error

{

“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”: “33614dd9-1bfc-42d5-bccb-4cbb1721760e”,

“links”: {

“support”: “https://help.hubspot.com/”,

“forum”: “https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations

},

“category”: “MISSING_SCOPES”

}

Hi @SDhakarwal :waving_hand:

What’s your authentication method (e.g. Private App, OAuth [Public App])?

If you’re authenticating via a Private App, the scope you’ll need to add for that call is crm.schemas.custom.read.

If you’re authenticating via a Public App, you’ll need to specifically request from HubSpot access to the relevant scope(s) to work with Custom Objects. You can find more information about this here: Custom Objects OAuth Access

I hope this proves useful. Please let me know if you have any follow-up questions.

Hi @zach_threadint
I’m authenticating via a Private App, the scope I already added for that call are

crm.objects.custom.write crm.schemas.custom.write crm.schemas.custom.read crm.objects.custom.read cms.domains.write crm.objects.contacts.write crm.objects.companies.write crm.lists.write crm.objects.companies.read crm.lists.readcms.domains.read

crm.objects.contacts.read

Hi @SDhakarwal :waving_hand:

Thanks for the update. Would you be able to share some additional information regarding your API request (e.g. request type [e.g. GET, POST], full endpoint URL, headers, body etc)? This might help us get to the bottom of the issue you’re experiencing.

I hope this proves useful. Please let me know if you have any follow-up questions.

Hi @zach_threadint
Here are Api baseUrl: https://api.hubapi.com
endpoint url: /crm/v3/schemas
Header Bearer Token : Access token

Request Type :Post

Body :

{

“name”:“car”,

“labels”:{

“singular”:“Car”,

“plural”:“Cars”

},

“primaryDisplayProperty”:“model”,

“secondDisplayPropertiees”:[

“make”

],

“searchableProperties”:[

“year”,

“make”,

“vin”,

“model”

],

“requiredPrperties”:[

“year”,

“make”,

“vin”,

“model”

],

“properties”:[

{

“name”:“condition”,

“label”:“Condition”,

“type”:“enumeration”,

“fieldType”:“select”,

“options”:[

{

“label”:“New”,

“value”:“new”

},

{

“label”:“Used”,

“value”:“used”

}

]

}

],

“uniqueProperties”:[

{

“name”:“notes”,

“label”:“NOTES”,

“type”:“string”,

“fieldType”:“text”

},

{

“name”:“vin”,

“label”:“VIN”,

“hasUniqueValue”:true,

“type”:“string”,

“fieldType”:“text”

},

{

“name”:“model”,

“label”:“MODEL”,

“type”:“string”,

“fieldType”:“text”

},

],

“associatedObjects”:[

“CONTACT”,

“DEAL”

]

}

Hi @SDhakarwal :waving_hand:

Thanks for sharing that. I thought you were reading an existing schema, not creating a new one. That makes more sense now.

I’m guessing your HubSpot Portal does not have access to the Custom Object feature. As per this knowledge base article, to use the Custom Objects feature, your HubSpot Portal needs to have at least 1 active Enterprise Hub subscription.

I hope this proves useful. Please let me know if you have any follow-up questions.

Hi Zach. I also came across with this issue. My current setup:

- I’m using a Developer Account that’s not on the Enterprise subscription.

- On this Developer Account, when I go to “Settings / Data Management/ Objects / Custom Object”, I cannot create Custom Object through the UI. There’s a Create button there with a lock icon, that redirects me to the plans page

- I also have a Test Account create off of that Developer Account that I’m using to test the Integrations

- On the Test Account, when I go to “Settings / Account Setup / User & Teams”, I see that under SEAT it says “Sales Enterprise Trial, Service Enterprise Trial”.

- On the Test Account, when I go to “Settings / Data Management/ Objects / Custom Object”, I can create Custom Object through the UI somehow. There’s a Create button that works. I was able to create a “Pets” test object.

- On the Developer Account, I have a public app. That app is installed and authorized through OAuth on the Test Account. I have the following scopes enabled: crm.objects.custom.read, crm.objects.custom.write, crm.schemas.custom.read.

- Now, when I try to use the `/crm/v3/schemas/` API, using the OAuth Access Tokens, to fetch the “Pets” object, it works. But when I use the same `/crm/v3/schemas/` API to create a new custom object, I get that same error response from the initial question: “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.”. Which is weird, 'cause as mentioned, I’m still able to create custom objects through the UI on the Test Account, but cannot create the custom objects through the API, for some reason.
My company is trying to provide HubSpot integration to our customers, so we’d only need a quick access to this Custom Object Creation API feature in order to develop this feature, test it out and ship it.
Can you help me out?