OAuth Access Token Request
This endpoint is used to obtain the access token to identify the Rev user that has successfully been granted access to Rev. May also be used to extend a session.
Request Body
application/json
{
"authCode" : "nxkJnMQVKdGiQm18vdzq5yXTZLSw5bFHvXHcUl9x6DuhbEiQ2fC6U872CNS3M6ORyz-K6JFMFI8U0rzxxC5xo_c6dMyLd1h9OLZsRbtK8Sc1",
"apiKey" : "1234qwer",
"grantType" : "authorization_code",
"redirectUri" : "https://url.company.com/webpage",
"refreshToken" : "8OuGKKxt5KBBq0bRgrtYZhTwDyX8bhqmpOhrrZTt3ygDyX8bhqmpOhrrZTt3ygDyX8bhqmpOhrrZTt3yg"
}
| Parameter | Type | Validations |
|---|---|---|
| authCode | string, required | Value of XXX for initial request and extend session. |
| apiKey | string, required | Configured in the Rev client. |
| grantType | string, required | The value should be set to authorization_code for the initial session request and set to refresh_token to extend an existing session. |
| redirectUri | string, required | URL of Web page to load after Rev credentials have been entered by the user. This page is where the final authentication steps will be performed and from which all subsequent API calls may be made. This value must be URL encoded. |
| refreshToken | string, optional only in the initial request | Not applicable for initial request and can be omitted. After the initial request, however, this value must be present and the value returned from the initial call for session extension. Note that this value may remain the same for a given session and can be used repeatedly in extend session requests as long as the session remains valid. Each extend session will generate a new accessToken value therefore the full authorization string must be recalculated after each extend session request before using in subsequent API calls. |
Response Messages
Successful response
{
"accessToken" : "nxkJnMQVKdGiQm18vdzq5yXTZLSw5bFHvXHcUl9x6DuhbEiQ2fC6U872CNS3M6ORyz-K6JFMFI8U0rzxxC5xo_c6dMyLd1h9OLZsRbtK8Sc1",
"refreshToken" : "LSw5bFHvXHcUl9x6DuhbEiQ2fC6U872CNS3M6ORyz-K6JFMFI8U0rzxxC5xo_c6dMyLd1h9OLZsRb",
"userId" : "b9a38810-cd84-480c-8232-5ec6320a6b47",
"expiration" : "2017-08-31T15:00:10.495Z",
"issuedBy": "VBrick"
}
| Return Parameter | Definition |
|---|---|
| issuedBy | issuer of the token (always “VBrick” for Rev) |
| accessToken | unique string granted by the issuer |
| refreshToken | for use in extended this session API |
| expiration | UTC date/time at which the session will expire. The length of time until expiration will be determined by the “Session Inactivity Timeout (in minutes)” specified in the administrative settings of Rev under System Settings->Security. |
| userID | Unique GUID of the Rev user who has been authorized. |
Unauthorized error
Internal server error