Skip to main content
Skip table of contents

Generate a user token to authenticate with the API

Below are steps on how to generate a token to use our API calls on our swagger page or from an external application or script .

  • First you will need to figure out which swagger page you will need to be connecting to US, UK, EU or AU

  • Once you have accessed the relevant swagger page that you’ll be using you will need to scroll down to the Users section.

You will use the /api/Users/authenticate post. You can click Try it out.

  • Now the call is able to be edited. You’ll want to replace the username and password string’s with your username and password.

"userName": "replace",
"password": "replace",
"oneTimePasscode": "string"

  • Once you have strings that need to be replaced with your username and password you will click the blue bar labeled Execute. If done successfully it will provide the curl, the request url, the response body and response header.

  • Now the information you need from here will come from the response body. You only need to data between the quotation marks after the semicolon. For example the response body provided is: "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJyZWFkZXIiLCJVc2VySWQiOiIxNDQiLCJVc2VyTmFtZSI6Ik1hdHRoZXdDU1RocnUiLCJGaXJzdE5hbWUiOiJNYXR0aGV3IiwiTGFzdE5hbWUiOiJMb2ZsaW4iLCJUZW5hbnRJZCI6IjY1IiwiY3R4IjoiNTk5NiIsIlByaXZpbGVnZUNvZGVzIjoiMTAwLDEwOSwxMTAsMTEzIiwiQ3VzdG9tZXJOYW1lIjoiQ1MgVGhydSAiLCJDdXN0b21lclN5c3RlbUNvZGUiOiJDVVZORkciLCJPcmdJZHMiOiIiLCJQZXJtaXNzaW9uQ29kZXMiOiIxMDAwLDYwMTEiLCJUcnVzdGVkRGV2aWNlRXhwaXJlcyI6IjE2Nzg4MjM5NDQiLCJleHAiOjE2Nzg5MTAzNDQsImlzcyI6Imh0dHBzOi8vaWRtLnRocnVpbmMuY29tOjQwMDk5IiwiYXVkIjoiaWRtLnRocnVpbmMuY29tIn0.Rdia1AXVhxPu0blIlyctZI0lcNVmPSdRsi6PjY3BjdMIvVDLmDm9SD2kDLUJ3LNGu2Cy5jwrEdIvDc6tsPLEiyWWcMhaeCaN9vwxsY0dsJ1kPWtBMDQMGqpeVA9iuSbxxcMGGuJk7hpmZxzQc5naZ4LB9Xcvb_bGBqs4XJFaUzrqKj4FecVR6PH-pwlACESkcA9ew5U8uYyaLNNL-Bn265JVsioxIC5btAHkwc2adivkJf4G8GOx4stC_elC3FseSJ8eo7EgKcLXfe2klKbi0goEm1kpJ2s8DjjmtyG5pE8P9Vsb_Pj2FmURqnFYyJO_2wlSMxCTrYZ96l71lu--ww" However an example of the information you need will start with the e and end at the w, this is shown below.

The information you will take from the response body is:

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJyZWFkZXIiLCJVc2VySWQiOiIxNDQiLCJVc2VyTmFtZSI6Ik1hdHRoZXdDU1RocnUiLCJGaXJzdE5hbWUiOiJNYXR0aGV3IiwiTGFzdE5hbWUiOiJMb2ZsaW4iLCJUZW5hbnRJZCI6IjY1IiwiY3R4IjoiNTk5NiIsIlByaXZpbGVnZUNvZGVzIjoiMTAwLDEwOSwxMTAsMTEzIiwiQ3VzdG9tZXJOYW1lIjoiQ1MgVGhydSAiLCJDdXN0b21lclN5c3RlbUNvZGUiOiJDVVZORkciLCJPcmdJZHMiOiIiLCJQZXJtaXNzaW9uQ29kZXMiOiIxMDAwLDYwMTEiLCJUcnVzdGVkRGV2aWNlRXhwaXJlcyI6IjE2Nzg4MjM5NDQiLCJleHAiOjE2Nzg5MTAzNDQsImlzcyI6Imh0dHBzOi8vaWRtLnRocnVpbmMuY29tOjQwMDk5IiwiYXVkIjoiaWRtLnRocnVpbmMuY29tIn0.Rdia1AXVhxPu0blIlyctZI0lcNVmPSdRsi6PjY3BjdMIvVDLmDm9SD2kDLUJ3LNGu2Cy5jwrEdIvDc6tsPLEiyWWcMhaeCaN9vwxsY0dsJ1kPWtBMDQMGqpeVA9iuSbxxcMGGuJk7hpmZxzQc5naZ4LB9Xcvb_bGBqs4XJFaUzrqKj4FecVR6PH-pwlACESkcA9ew5U8uYyaLNNL-Bn265JVsioxIC5btAHkwc2adivkJf4G8GOx4stC_elC3FseSJ8eo7EgKcLXfe2klKbi0goEm1kpJ2s8DjjmtyG5pE8P9Vsb_Pj2FmURqnFYyJO_2wlSMxCTrYZ96l71lu--ww

  • Once you have this information copied you will go back to the very top and click on the green Authorize button.

  • You will paste your data in the value box. Once pasted you will click the green Authorize. If done successfully you’ll see this message.

Now you are ready to run example API calls.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.