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 Fields
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
- },
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/
This blog helps to authenticate the API to your application to fetch the information