Api Error

I’m trying to create a basic ticket with the v3 Tickets API. My request body is:

{ “properties”: { “subject”: “Test Ticket Creation”, “hs_pipeline”: “default”, “hs_pipeline_stage”: “default-stage”, “hs_ticket_priority”: “MEDIUM” } }

Response:

{ “success”: false, “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.\\](https://developers.hubspot.com/scopes.\)”, ‘correlationId’: ‘c0ea401c-ca65-4b28-b9f7-9202daf1eed7’, ‘errors’: [{‘message’: ‘One or more of the following scopes are required.’, ‘context’: {‘requiredGranularScopes’: [‘tickets.sensitive.v2’, ‘tickets.highly_sensitive.v2’, ‘tickets’]}}], ‘links’: {‘scopes’: ‘Working with OAuth - HubSpot docs’}, ‘category’: ‘MISSING_SCOPES’}” }
I’ve already added the Tickets scope in my application listing, but I am not able to view the other apis or able to make the request either.

Hi @dmejiac and welcome, we are delighted to have you here!
Thanks for reaching out to the HubSpot Community!
For information, here is the documentation to create tickets via API: “CRM API | Tickets” and here is the one about scopes needed.
Can you please share a screenshot or a list of the scopes that you added?

The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.

Hi @tominal, @SteveHTM and @sylvain_tirreau do you have suggestions to help @dmejiac, please?
Have a lovely day and thanks so much in advance for your help!
Bérangère

Hi @dmejiac

Here is the curl that is working fine for me -

Here is the curl that is working fine for me -
curl --location 'https://api.hubapi.com/crm/v3/objects/tickets' \
--header 'authorization: Bearer ' \
--header 'content-type: application/json' \
--data ' {
 "associations": [
	{
 	"types": [
 	{
 	"associationCategory": "HUBSPOT_DEFINED",
 	"associationTypeId": 16
 	}
 	],
 	"to": {
 	"id":
 	}
	}
 ],
 "properties": {
	"subject": "test ticket",
	"hs_pipeline": "0",
	"hubspot_owner_id": "",
	"hs_pipeline_stage": "",
	"hs_ticket_priority": "HIGH"
 }
}'

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!