Authentication: getOAuthToken

Deprecated

Creates an OAuth2 authorization server token endpoint.

Request

HTTP request

POST /v2/oauth2/token

Responses

Code Description Reference
201 Created Successful response.
400 Bad Request Error encountered.

SDK Method

Authentication::getOAuthToken

Definitions Expand All | Collapse All

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCode string

An error code associated with the error.

message string

A short error message.

nameValue

errorDetails errorDetails
name string

The name or key of a name/value pair.

originalValue string

The initial value of the tab when it was sent to the recipient.

value string

The value field of a name/value pair.

oauthAccess

access_token string

Access token information.

data
[nameValue]
expires_in string
refresh_token string
scope string

Must be set to "api".

token_type string

Examples

Generic JSON Response

Response

{
"access_token": "sample string 1",
"token_type": "sample string 2",
"expires_in": "sample string 3",
"refresh_token": "sample string 4",
"scope": "sample string 5",
"data": [
{}
]
}

Generic XML Response

Response

<oauthAccess 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<access_token>sample string 1</access_token>
<data>
<nameValue />
</data>
<expires_in>sample string 3</expires_in>
<refresh_token>sample string 4</refresh_token>
<scope>sample string 5</scope>
<token_type>sample string 2</token_type>
</oauthAccess>