APIs & Integrations

MJensen
Member

Create Tickets API results in "must have scope tickets-write"

SOLVE

Hello,

The API key generated for hub id 2348933 will not allow the creation of tickets; the post returns a 400 bad request with the following response:

{

  "status": "error",

  "message": "Must have scope tickets-write",

  "correlationId": "33289d8f-e3e0-44de-9cbf-b44a4b22cc9e",

  "requestId": "f1a12e76-c745-445e-abdb-ca5226dcee7d"

}

 

The same request using the API key for the hub 6271048 succeeds.  Please advise.

Thanks,

Mike

0 Upvotes
1 Accepted solution
cbarley10
Solution
Contributor

Create Tickets API results in "must have scope tickets-write"

SOLVE

Hey Mike, are you using an API key, or OAuth to authenticate this request? If it's an API key, does the portal you're using have the ability to create Tickets in app? If it's oauth, have you given the token access to the "tickets" scope and authorized the app as a Super Admin with this scope included in your authorization URL? 

 

If those are all true, providing your HubID and an example of a raw request (the actual request, not the code written to complete the request) would be helpful moving forward.

 

Thanks!

 

Connor

View solution in original post

2 Replies 2
cbarley10
Solution
Contributor

Create Tickets API results in "must have scope tickets-write"

SOLVE

Hey Mike, are you using an API key, or OAuth to authenticate this request? If it's an API key, does the portal you're using have the ability to create Tickets in app? If it's oauth, have you given the token access to the "tickets" scope and authorized the app as a Super Admin with this scope included in your authorization URL? 

 

If those are all true, providing your HubID and an example of a raw request (the actual request, not the code written to complete the request) would be helpful moving forward.

 

Thanks!

 

Connor

MJensen
Member

Create Tickets API results in "must have scope tickets-write"

SOLVE

Hi Connor,

 

Thanks for the reply. I was using the API key instead of OAUTH.  Turns out that the portal didn't have the ability to create tickets, but now it does, and the API call worked this morning to successfully create a ticket.

 

Many thanks,

Mike