AVANSER User API requires users to login with their AVANSER username and password before making any further API calls.
When an application makes a login request, the API returns an access token that must be included with all API calls to identify the user. This access token is persistent and non-expiring.
If a user decides to logout of their AVANSER account, the application should make a logout request to remove the access token.
Request an access token to use in API calls. The access token is returned as a string in the data key.
Errors
| Error Code | Error Type | Error Message |
|---|---|---|
| -1004 | ALREADY-LOGGED-IN | You are already logged in |
| -1005 | MISSING-USERNAME | username field missing |
| -1006 | MISSING-PASSWORD | password field missing |
| -1008 | MISSING-DEVICEID | deviceId field missing |
| -1030 | ERR_INVALID_USER | Invalid username |
| -1028 | ERR_INVALID_PASSWORD | Password is not valid |
| -1029 | ERR_USER_LOCKOUT | This account has been locked due to too many incorrect login attempts |
| -1031 | ERR_PASSWORD_90EXPIRY | Password expired, please reset your password |
| -1032 | ERR_USER_6MEXPIRY | User has not been active in the last six month, please reset your password |
| -1020 | LOGIN-FAILED | Invalid username or password |
ERR_INVALID_USER and ERR_INVALID_PASSWORD and the standard errors returned if the login credentials entered are incorrect. LOGIN-FAILED is a generic error returned if the login attempt fails for an unspecified reason. This may include an invalid username or password depending on the client that the user belongs to.
A string to uniquely identify the application requesting the access token. If a user could feasibility login to two instances of the same application (eg. two organisations in the same CRM), each of these should provide a unique deviceId (eg. by appending the organisation ID to the name of the application). This ensures that separate access tokens are generated for each instance, so that, for example, logging out of one instance doesn't remove access from the other.
- Avanser Productionhttps://p3.avanser.com/app/login
- AVANSER Mock Serverhttps://avanser.redocly.app/_mock/user-api/references/login
curl -i -X POST \
'https://p3.avanser.com/app/login?username=string&password=string&deviceId=string&device=string'Access token in data.
The time that the API response left the server, represented as the number of seconds since the UNIX epoch.
The number of seconds that it took to process the API request.
Boolean indicating whether there was an error returned by the API request.
{ "timestamp": 1508903167, "exection": 0.00041531896591187, "error": false, "data": "13beb532cc997f2066d60eff65ea9d30" }