FD API get requests failing since today (403 error) from Google Apps Script

Hello. My name is Isaac and I’m having an issue with some of the “GET” Freshdesk APIs.

Until this morning, I was working fine with “GET” API requests (for fetching tickets lists, customers lists, agents lists, and specific ticket data mainly).

This morning and with no change in my code itself, I started getting “403 Forbidden” errors on all my requests made in Google Apps Script, but not in Postman (weird). I will share now a code example, but I still continue to highlight that until yesterday, this code has been working perfectly for several months.

The issue is not on my account or the API Key itself, because (1) my account has not changed and still keeps Administrator privileges in our Freshdesk, and (2) the request itself continues to work fine in another system (Postman).

Google Apps Script code snippet (no longer works since today / some hours ago):

let ticket = 47;
let url = 'https://mysupportplatform.freshdesk.com/api/v2/tickets/' + ticket;
let headers = {
    "contentType": "application/json",
    "Authorization": "Basic " + Utilities.base64Encode('MyAPIKey:X'),
    muteHttpExceptions: true
let options = {
    'method': 'GET',
    'headers': headers,
    muteHttpExceptions: true
response = UrlFetchApp.fetch(url,options);

Postman code snippet (still works):

curl --location --request GET 'https://mysupportplatform.freshdesk.com/api/v2/tickets/47' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic MyEncodedAPIKey' \
--header 'Cookie: _x_w=39_1'

The GAS code gets me this answer now:

<head><title>403 Forbidden</title></head>
<center><h1>403 Forbidden</h1></center>

Here, of course, I would expect a Json object with the data requested.

I wonder whether a settings changed in some of the APIs? Is anyone else who uses GAS to fetch Freshdesk data via API having a similar issue?
The other possibility is that a change has occured in Google Apps Script settings - but my first thought was Freshdesk itself, hence the question. If anyone else uses GAS, your info would be very appreciated too!

Thanks in advance and Best Regards!

@Isaac_Gutierrez - Your last post was over 6 months ago! Welcome back!!

To our knowledge, there’s hasn’t been any changes in ways how Freshdesk APIs operate, however we will attempt to get in touch with Freshdesk team to confirm the same.

If no progress, I will initiate a private thread to ponder over the logs to further debug this. Please see of you’ve seen any updates on Google Apps Script platform.

1 Like

Hi Saif,

Thanks for your reply!!

It inexplicably started working again just recently, and now my GET requests in Google Apps Script are getting the expected responses. They failed on my automatic processes since like 12 hours ago, until around 1 hour ago.

I’ll be monitoring this for any new incidences, but it’s really weird. If there’s any confirmation on the Freshdesk team, I’d be glad to know.

Thanks you and best regards,

I was able to hear back from the Freshdesk team.
There were no changes on their end. But were open to assist if there is anything specific to your account on a private thread to gather account information.

Since this seems to be sporadic based on what you shared, do feel free to create a new topic (reference to this topic) if you observe any irregular behavior, we will be happy to help you out. :smiley:


Understood. I’ll do that if it happens again. Thank you Saif!

This topic was automatically closed after 14 days. New replies are no longer allowed.