POST User/authenticate
Authenticates a user and returns a user token.
Request Information
URI Parameters
None.
Body Parameters
AuthenticateRequestName | Description | Type | Additional information |
---|---|---|---|
userName |
User's account username |
string |
Required |
password |
User's account password |
string |
Required |
code |
Security code |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "userName": "sample string 1", "password": "sample string 2", "code": "sample string 3" }
application/xml, text/xml
Sample:
<AuthenticateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AutoAlert.API.Models.User"> <code>sample string 3</code> <password>sample string 2</password> <userName>sample string 1</userName> </AuthenticateRequest>
Response Information
Resource Description
AuthenticateResponseName | Description | Type | Additional information |
---|---|---|---|
token |
Access token |
globally unique identifier |
None. |
code |
API result code |
integer |
None. |
error |
API error message |
string |
None. |
UserID |
User ID |
integer |
None. |
IsEmployee |
IsEmployee |
boolean |
None. |
expirationDateUtc |
Expiration Date as UTC |
date |
None. |
APIVersion |
API Version |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "UserID": 1, "IsEmployee": true, "expirationDateUtc": "2024-10-03T18:43:24.6067024-07:00", "APIVersion": 4, "token": "d6b4928a-90a3-4414-ae08-3bb305edab69", "code": 200, "error": "sample string 2" }
application/xml, text/xml
Sample:
<AuthenticateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AutoAlert.API.Models.User"> <APIVersion xmlns="http://schemas.datacontract.org/2004/07/AutoAlert.API">4</APIVersion> <error xmlns="http://schemas.datacontract.org/2004/07/AutoAlert.API">sample string 2</error> <IsEmployee>true</IsEmployee> <UserID>1</UserID> <expirationDateUtc>2024-10-03T18:43:24.6067024-07:00</expirationDateUtc> <token>d6b4928a-90a3-4414-ae08-3bb305edab69</token> </AuthenticateResponse>