@freshworks/freshdesk
v0.0.1
Published
Freshdesk SDK - a javaScript SDK for Freshdesk APIs
Downloads
1,085
Readme
Overview
Freshdesk SDK - a javaScript SDK for Freshdesk APIs
Getting Started
Usage via NPM
- To install, run:
npm install @freshworks/freshdesk --save
- 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);
});
Usage via CDN
- In your application HTML file, add the following script:
<script src="https://unpkg.com/@freshworks/freshdesk/dist/freshdesk.js">
</script>
- 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);
});
Refer to the documentation for more details.
Authorization
basicAuth
- Type: HTTP basic authentication