Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before any API call is made, an authorisation token must be created.


1. Open Postman.

2. Enter the URL in the URL request box. 
3. Set the request type to 'POST'. 4


3. Add the clientId and clientSecret.
5. The clientId and clientSecret need to be joined and ended with a colon. NOTE- btoa() encodes the value in base 64.

...

// NOTE: Professional Services should provide these values
var clientId = '7BEFD2BA2C50424FA05248D42D6668BB';
var clientSecret = '114F3F65162F46D899EEEF6426768606';
 
// Join the above two values together with a colon in between and base64 encode the result.
var auth = btoa(clientId + ":" + clientSecret);

6. Do a call Enter the URL in the Access Token URL field. 


4. Add the client ID and Client Secret provided to you.

Image Added

6. Click Get New Access Token to get the token. 

Tthe The 'Authorization' uses the above auth value to generate the token:
Image Removed

...

:

...



7. The response is an object with two fields:

  • response.token_typeToken Type: this is the authorisation type that is needed for the api calls (should be 'bearer' usually)
  • response.access_tokenAccess Token: this is the actual token

Image Added

Make the API call

The token_type and access_token Token Type and Access  Token are needed to make the API call. The API endpoint requires use of the token type and token in the authorisation header.

The API request content is returns the payload.
Image Removeds

...

headers and payload in JSON.


NOTE - The response object should contain a response that allows you to see whether the call succeeded and whatever response information the call will return. All responses should contain "Success" and may contain "Message" (it should have the field but might have no content depending on the service). All other fields on the response object are endpoint specific.