Get contents

Once the package is installed, you will need to import it in your required JS file.

import { DialogueWiseService } from 'dialoguewise';

Before we can call the API, we need to prepare the payload.

  let request = {
    slug: '[Your Slug]',
    accessToken: '[Your Access Token]',
  };

Now, all you need to do is to call the API using this payload

let dialogueWiseService = new DialogueWiseService();
let res = await dialogueWiseService.getContents(request);

Your content is now available in the res object which you can use in your app. You can checkout our sample app on our Github.