Freshworks named the only Challenger in 2021 Gartner® Magic Quadrant™ for ITSM tools. Access Report

Start a new topic

Can't make GET request

I'm trying to make a GET request to external API with Ajax, mentioned url in 'whitelisted-domains', but API is not getting data, i received Error 502 Bad Getaway, Error in establishing connection. It seems freshdesk environment blocks it somehow.

3 people have this problem

Hi Michael,

Can you share the code snippet we can suggest.



Yea, of course

(1.49 KB)

Hi Michael,

The URL is invalid, it throws 404 on my browser and using freshdesk proxy ($request.get) I get 502.  This is because we send 502 on error.

Check the URL u hit




Hi Mahesh

thank you for your answer

As you can see in my code i am trying to access a different URL and not the one you mentioned.

The code is calling url:

You can validate this URL and it works just fine.

Can you help?

Hi Michael,

Internally the this.$request.get uses the node request, if u try doing a 'get' on the URL you get a error.

$ node

> let r = require('request');


> r.get('', function(err, resp, data){ console.log('error - ', err); console.log('resp - ', resp); console.log('data - ', data);})

> error - { Error: unable to verify the first certificate

    at Error (native)

    at TLSSocket.<anonymous> (_tls_wrap.js:1060:38)

    at emitNone (events.js:86:13)

    at TLSSocket.emit (events.js:185:7)

    at TLSSocket._finishInit (_tls_wrap.js:584:8)

    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }

resp - undefined

data - undefined

Looks like there is some cert problem, Please check ur end.



Even I have this problem with Freshdesk Developer v2 Request API. The domain is in the whitelisted domain but the response is 

errorSource :"APP"
headers : {}
response : "Error in establishing connection"
status : 502

 Please help me solve this issue.

1 person likes this

Hi Anish,

Please share your code snippets and app details to debug.


Janani V.

Hello, I have the same issue of 502 connection error.


var options = {
                            "headers" : {
                              "Content-Type": "application/json"
        };              };
                        var url = "";
                        client.request.get(url, options)
                        .then(function(data) {
                          console.log('success' + data.language);
                        }, function(error) {
                          console.log('danger' + JSON.stringify(error));

 Here is my code snippet I am using mock API as my local api is also giving the same error. Please help me on this issue. Also if there is any way to call local api (non https) using fdk app.



I got the same error, have you resolved this issue?

I got the same error

We have recently launched forum for Freshworks developer community ( We encourage all the developers to discuss queries, ambiguities, know-hows, and points of interest with fellow app developers and Freshworks’ engineers on the forum.  We will involve the stakeholders directly on the forum topic to help you get your answers quicker.

Login or Signup to post a comment