Skip to main content
Answer

api POST a create ticket are getting error 410 "Deprecated API"

  • April 14, 2025
  • 5 replies
  • 78 views

Forum|alt.badge.img+1

Hi I made an Google Script app(Used this template) to create help desk ticket but when I run my app its getting error 410 “Deprecated API”

 

api POST a create ticket are getting error 410 "Deprecated API"

Best answer by Daniel Söderlund

Hi I made an Google Script app(Used this template) to create help desk ticket but when I run my app its getting error 410 “Deprecated API”

 

api POST a create ticket are getting error 410 "Deprecated API"

Looks like you are using the old API 

Have you checked https://developers.freshdesk.com/api/#create_ticket ? 
Looks like the github are 11 year old. 

5 replies

Daniel Söderlund
Top Contributor ⭐
Forum|alt.badge.img+14

Hi I made an Google Script app(Used this template) to create help desk ticket but when I run my app its getting error 410 “Deprecated API”

 

api POST a create ticket are getting error 410 "Deprecated API"

Looks like you are using the old API 

Have you checked https://developers.freshdesk.com/api/#create_ticket ? 
Looks like the github are 11 year old. 


Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 14, 2025

Thanks  for your guide. that worked but Im getting 401 Authentication required error now. 

This is my code 

function createTicket(e) {

var API_KEY='My API ';

var ENDPOINT = 'My domain'; // change to https if SSL is configured.

var headers = {
'Content-type': 'application/json',
'Authorization': 'Basic ' + Utilities.base64Encode(API_KEY + ':X')
};


var payload = '{"helpdesk_ticket":{"description":"Description ...","subject":"Title","email":"user@test.com","priority":1,"status":2},"cc_emails":"example1@example.com"}';



var url = ENDPOINT + '/api/v2/tickets';

var options = {
'method': 'post',
'headers': headers,
'payload': payload,
muteHttpExceptions: true
};

var response = UrlFetchApp.fetch(url, options);

Logger.log("code: " + response.getResponseCode());
Logger.log("text: " + response.getContentText());
}

 


Daniel Söderlund
Top Contributor ⭐
Forum|alt.badge.img+14

Hmm, where did my post go ? Oh well. 

 

401 you need to look at the API key and 'Authorization': 'Basic ' + Utilities.base64Encode(API_KEY + ':X')


Jaden44
Apprentice
Forum|alt.badge.img
  • Apprentice
  • April 15, 2025

401 Authentication required error now. That’s what I get.


Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 16, 2025

All resolved the issue was my domain url was wrong.

 

Thanks anyway