Rev Username Login
The Username Authentication methods include the following endpoints:
- Username Login
- Username Logoff
- Extend Session
This set of endpoints are typically used for Server side/automation workflows that use a single Rev account dedicated for API automation and allow developers to authenticate with Rev using a specific Rev username and password. Example: Integrations where no user interface or user interaction is required.
Once a session is established using the Username Login endpoint, subsequent API calls may be limited according to the privileges of the authenticated user. A username and password must be specified. The token
value in the response is used to build the authorization Header value for subsequent calls.
Example: Authorization = VBrick <token>
The expiration
value in the response indicates the date/time when the session will expire. Please note that the expiration value is determined by the Session Inactivity Timeout value as specified in the Rev Admin console under System Settings->Security.
The userId
value in the response is the unique identifier of the logged-in user.
Request Body
application/json
{
"username" : "john.smith",
"password": "Password123"
}
Parameter | Type | Validations |
---|---|---|
username | string, required | username of account trying to login |
password | string, required | password of account trying to login |
REQUEST: Login and get an authentication token. change “myusername” and “mypassword” to the credentials for a Rev user.
{curl -XPOST https://MY_REV_URL/api/v2/user/login -H "Content-Type:application/json" -d '{"username":"myusername","password":"mypassword"}'
}
Response Messages
Successful response
{
"token": "T9-GJqSH7dQSBqcUUVP0la6IHEyc9cR00Mj2ysD_fPwdKv0JMOcsJ9Sf2jR8nSvwgRgaZasExlH1xd5-XeqmUg2",
"issuer": "VBrick",
"expiration": "2017-08-31T15:00:10.599Z",
"email": "john.smith@abc.com",
"id": "5b8f0285-7627-4ee7-b67b-e2e9e8944279",
"username": "john.smith",
"firstName": "John",
"lastName": "Smith",
"language": "English"
}
Unauthorized error
Internal server error