Skip to main content

When using Freshdesk.Widget request method, with auth_type set to "OAuth", I'm able to retrieve access token from my REST service. Now, in order to get other data, I need to send this token as OAuth-Token in request header.


Does nayone know how this can be achieved?



In case someone else need this, here is how to send oauth token using request method:


    var req_body = {
rest_url: 'rest/v10/Accounts?max_num=3',
method: 'post',
content_type: '',
on_success: function(data) {
console.log(data.responseJSON);
},
on_failure: function(data) {
console.log(data.responseJSON);
}
};
req_body["custom_auth_header[OAuth-Token]"] = accessToken;
proxy.request(req_body);
}