cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1429
Views
0
Helpful
1
Replies

Send requests to finesse api with auto authorization

How can I send requests to Finesse API from gadget. because when I make basic http site with javascript methods to send (using xmlhttprequest) it works but I cant make auto authorization.

When I make gadget a nd use gadgets.io.makeRequest it show me it is remaining authentication, so there I have problem how make basic authentication from gadget.. 

 

Maybe somenone know how to do that?

1 Reply 1

Try this in gadget:


    params = params || {};
    var userCredentials = finesse.gadget.Config.authorization;
    params[gadgets.io.RequestParameters.HEADERS] = params[gadgets.io.RequestParameters.HEADERS] || {};
    params[gadgets.io.RequestParameters.HEADERS]["Authorization"] = "Basic "+userCredentials;

it is fragment of method my makerequest