Versions Compared

Key

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

...

All API methods require a security token to use the system. This token is stored in the HTTP cookie to allow multiple API calls from one authentication request. A token is requested by authenticating with a user username and password combination.

Token URL

  • Method: GETPOST

  • Endpoint: https: //api.tforge.co.za/voice/user/apitoken/{login}omni/user/authorize

  • System Authorization: Authorization: Key=your-auth-key

Paste code macro
languagejson
titleRequest Example
{
  "user_name": <user_name>,
  "password": <Base64Password>
}

The Token service API will return a token on success.

Paste code macro
languagejson
titleResponse sample
To be added...

Password

...

{
   "user_id": <int>,
   "user_name": <string>,
   "token_key": <string>,
   "expiry_date": <dateTime - ISO 8601 format>
}

Password

The password needs to be converted to Base64 with ASCII encoding to get the bytes[] from the password string.

...

  • It is recommended that you keep track of the Token Key and its expiry as making a request every time can slow down the import process.Login should be plain text.

When a successful API call is made to the API Token service, it will return a JSON object. A user token key must be passed to each API endpoint along with the request.