Overview

Freshdesk SDK - a javaScript SDK for Freshdesk APIs

Getting Started

Usage via NPM

  • To install, run:
npm install @freshworks/freshdesk --save
1
  • Execute the following JS code to get ticket details:
let Freshdesk = require('@freshworks/freshdesk');
let fd = new Freshdesk({ domain: 'sample.freshdesk.com', api_key: 'xxxxxxxxx' });
fd.tickets.getTicket(12345, {'include': 'conversations'}).then(function (result) {
  console.info('Data');
  console.info(result);
}).catch(function (error) {
  console.error('Error');
  console.error(error);
});
1
2
3
4
5
6
7
8
9

Usage via CDN

  • In your application HTML file, add the following script:
<script src="https://unpkg.com/@freshworks/freshdesk/dist/freshdesk.js">
</script>
1
2
  • Execute the following JS code to get ticket details:
let fd = new Freshdesk({ domain: 'sample.freshdesk.com', api_key: 'xxxxxxxxx' });
fd.tickets.getTicket(12345, {'include': 'conversations'}).then(function (result) {
  console.info('Data');
  console.info(result);
}).catch(function (error) {
  console.error('Error');
  console.error(error);
});
1
2
3
4
5
6
7
8

Authorization

basicAuth

  • Type: HTTP basic authentication
Last Updated: