Question

Getting access denied while creating ticket

  • 14 April 2023
  • 7 replies
  • 548 views

Badge

Hi Team,

 

I have setup a trial version of it and was trying to create a ticket using API my API key calling endpoint POST “api/v2/tickets”.

 

It throws below error:

{

    "code": "access_denied",

    "message": "You are not authorized to perform this action."

}

 

Although i am able to get the tickets using the same API key GET  “api/v2/tickets”.

 

Please help me what permission should i have to create the ticket? I am the Admin of the instance i am using.


7 replies

Userlevel 1
Badge +3

Hi @shekhar.das

 

Thank you for reaching out! 

To start working on modules like tickets, tasks, changes etc., please add an “Agent role” to your profile. Admin role provides privileges only to manage settings of the account and not data within. 

 

Thanks! :) 

Badge

Hi Preethi,

 

Thank you for your response, I do not have option to add role. Please see below.

 

Regards,

Shekhar Das

Userlevel 1
Badge +3

Hi @shekhar.das 

 

Could you please check the workspace you have been added to? If not, please add yourself to a workspace and try again.

 

Thanks :) 

Userlevel 3
Badge +3

Hi @shekhar.das 

Can you please share a screenshot of what API settings you are configuring in the web request node. This will help us to investigate better.

Thanks !

Did we ever figure out the issue here? Im having the same problem. 

Userlevel 5
Badge +5

Hello @rtiglao 

Hope you are well,

This is an access-based issue. You can check if your Profile/API Key has the access to modules like tickets, tasks, changes etc.,(depending upon the API call being made). If you could share your endpoint URL(stripping your domain) and payload you’re using, We can probably check and let you know what’s going wrong or You can also reach out to support@freshservice.com to get guidance on the issue you’re facing and we can probably take and look and help you out.

Cheers and Happy Holidays!😊

Hi there,

I can confirm that by adding the “IT agent” role to a user and generating the API key from that profile resolved the access issue for me. 

Best regards,
Rimaz Farouk

Reply