Initialize the client

Let's begin by creating the index.html file, and initializing the client. Copy this code:

<script src="[email protected]/dist/index.js"></script>
// Pass the URL to your Deskpro instance when creating the client.
var client = new DeskproClient('');
// Many API methods require authentication. Set the ID of the user
// to authenticate with and either the auth key or token.
client.setAuthKey(1, 'dev-admin-code');
// client.setAuthToken(1, 'AWJ2BQ7WG589PQ6S862TCGY4');
.then(function(resp) {
.catch(function(err) {

Open the index.html in your browser and open the debug console. You'll see a bunch of JSON output. Something like:

"id": 107,
"title": "This is a title",
"id": 106,
"title": "This is a title",