POST api/v1/oauth2/environment/token
Get access token
Request Information
URI Parameters
None.
Body Parameters
request
EnvironmentOAuth2TokenV1RequestName | Description | Type | Additional information |
---|---|---|---|
grant_type |
Grant type Supported values: password |
string |
Required Allowed values (case insensitive): 'password' Example value: password |
username |
Username |
string |
Required Example value: JohnDoe |
password |
Password |
string |
Required Data type: Password Example value: mBoiWXSnLE9H7eU9mjT9whK5LP8KBWKX Min length: 100 |
environment |
Environment |
string |
Required Example value: World |
Request Formats
application/x-www-form-urlencoded
?grant_type=password&username=JohnDoe&password=mBoiWXSnLE9H7eU9mjT9whK5LP8KBWKX&environment=World
Response Information
Resource Description
Obtain an access token to use secured endpoints
EnvironmentOAuth2TokenV1ResponseName | Description | Type | Additional information |
---|---|---|---|
access_token |
Access token |
string |
Required Example value: 79AVuxU7luni4UsbVw2xfRBVp-vfUuL07IKCcm |
token_type |
Token type |
string |
Required Example value: bearer |
expires_in |
Token lifetime in seconds |
integer (64 bits) |
Required Example value: 300 |
username |
Username |
string |
Required Example value: JohnDoe |
.issued |
Date and time the token is issued |
date |
Required Example value: 12/31/2018 23:59:59 +02:00 |
.expires |
Expiry date and time of the token |
date |
Required Example value: 12/31/2018 23:59:59 +02:00 |
Response Formats
application/json
{ "access_token": "79AVuxU7luni4UsbVw2xfRBVp-vfUuL07IKCcm", "token_type": "bearer", "expires_in": 300, "username": "JohnDoe", ".issued": "2018-12-31T21:59:59.999+00:00", ".expires": "2018-12-31T21:59:59.999+00:00" }