API Guide / Introduction / Authentication and secure access
Authentication and secure access

After creating a user (either Login user or API user), you will need to create the access token to access all the APIs in the next step.

To generate the access token, you need to send an authentication request to Login API using URL in the following format.

https://Witly.co/api/v2/login?user={0}&pwd={1}

The parameter sent must contains the username and password. If the information is correct, Witly will send the access token back to you as shown below.

{

"Token":"5c33446ac1c049049f9232cf296bdf10",

"TokenExpiryDate":"2017-04-26T20:24:44.3529664+07:00"

}

The token you receive will have the following limitations.

  1. It will be a temporary token that lasts only 20 minutes after the last API request. Thus, if there is no API request, the token will expire within 20 minutes. On the other hand, the token lifetime will be extended if there is API request
  2. If there is API login request with this username, the token received previously will expire.
  3. Token will expire if the user is deactivated.
  4. You must always send this token as a parameter for other APIs request except Hello API and Login API, which does not require token.
Last modified on Jan 23, 2018