how to get all reacord data of custom objects

My private app added some scopes

but when i am hitting api

https://api.hubapi.com/crm/v3/schemas

giving me error

{

"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": "5143fa12-ca96-4ec7-8a05-f3177ad170e0",

"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"

}

and when calling https://api.hubapi.com/crm/v3/objects/custom giving this error

{

"status": "error",

"message": "Unable to infer object type from: custom",

"correlationId": "2d0ddf48-f2d3-48e7-a0d5-4a61f52f7b65"

} i want to retrive all records drom my custom object and i here my objettype is custom

Hi @SChaudhury9 :waving_hand:

Relating to the first issue you’ve described, what you’ll need to do is add the following scope to your Private App and then try the request again:

  • crm.schemas.custom.read

Relating to the second issue you’ve described, the custom object name field is case-sensitive, so it might be worth double checking that first. You can also use the objectTypeId, rather than the custom object’s name. You can retrieve this from HubSpot web UI by navigating to the relevant custom object’s list page (e.g. Contacts > Custom Objects > Your Custom Object), and then grabbing the objectTypeId from the page URL. For example, the objectTypeId from the URL below is 2-104518576

So your endpoint would then become, for example: https://api.hubapi.com/crm/v3/objects/**2-104518576**

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

hey @zach_threadint

In my private app the scope you have specfied is already added i am attaching the list of scopes

crm.objects.contacts.writecrm.objects.contacts.readcrm.objects.custom.writecrm.schemas.custom.writecrm.schemas.custom.readcrm.objects.custom.read

but still givng me same erorr

And in second case i have got my custom object id url that is 2-22478587

so as your suggestion the endpoint should look like https://api.hubapi.com/crm/v3/objects/2-22478587

but then also it is giving me error

{

"status": "error",

"message": "Invalid object or event type id: 2-22478587",

"correlationId": "1f0a2bfe-50c3-4492-b811-85702dc88a9a"

}

Hi @SChaudhury9 :waving_hand:

That’s very strange, indeed. All I can recommend at this point is to triple-check you’re referencing the correct Private App key value in your request header.

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