FreshPlugs - how to send oauth token?

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?

1 Comment

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) {
on_failure: function(data) {
req_body["custom_auth_header[OAuth-Token]"] = accessToken;
Login or Signup to post a comment