JITBIT helpdesk API in sharepoint

0
165
views

In this blog, I have explained how to generate access token for play with JITBIT helpdesk API

What is JITBIT helpdesk?

JITBIT is a complete web based helpdesk software to track and manage your support ticket, also integrated with your email system. Some of the API below.

•Manage Tickets(Create/Update)
•Manage Users(Create/Update)
•Manage Articles
•Custom Field

    s

and more

Let’s get started to create base 64 token to pass the authorization header to fetch the results from JITBIT

Code:

var authheader = function(username, password) {
	return "Basic " + btoa(username + ":" + password);
}
Btoa – helps to encode a string into baase-64
var auth = authheader (‘admin’, 'admin’);
Console.log(auth);

You can pass into API call authorization header like this

"headers": {
"authorization": auth //encoded values from the above script
},

Full Code:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<script>

var authheader = function(username, password) {

                return "Basic " + btoa(username + ":" + password);

}

var auth = authheader (‘admin’, 'admin’);

console.log(auth);



</script>

Result:

API references: https://www.jitbit.com/helpdesk/helpdesk-api/

Conclusion:
This blog helps to authenticate the API to your application to fetch the information

Please follow and like us:
0

LEAVE A REPLY

Please enter your comment!
Please enter your name here