Whatever message this page gives is out now! Go check it out!
http(s)://example.com/oauth2/tokeninfo?access_token=3ffb313f16856a4d6b1feecd2e50b950GET example.com/oauth2/token HTTP/1.1Host: example.comAuthorization: Bearer 3ffb313f16856a4d6b1feecd2e50b950Request Parameter | Description of the parameter |
grant_type | Specifies the requested grant type. To use this flow, the value is client_credentials. |
client_id | The Id that uniquely identifies the application. The client id can be found in the API Manager application. |
client_secret | Specifies the client credential registered with the application in API Manager. |
scope (optional) | Specifies the list of scopes required for the access token. If multiple scopes are required, specify the scopes as a space-delimited string. |
POST example.com/oauth2/token HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedgrant_type=client_credentials&client_id=625bc9f6-3bf6-4b6d-94ba-e97cf07a22de&client_secret=625bc123-3bf6-4b6d-94ba-e97cf07a22de&scope=sample_read%20sample_writePOST example.com/oauth2/token HTTP/1.1Host: server.example.comAuthorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JWContent-Type: application/x-www-form-urlencodedgrant_type=client_credentials&scope=sample_read%20sample_writeResponse Parameter | Description of the Response Parameter |
access_token | The access token that can be used to call the protected API. |
token_type | Specifies the type of the requested access token. Currently the API Manager supports only bearer tokens. |
expires_in | The lifetime in seconds of the access token. The access token lifetime can be configured by changing the access token lifetime in API Manager application. |
scope (optional) | The Granted/Approved scopes associated with the requested access token. |
{ "access_token": "7ee85874dde4c7235b6c3afc82e3fb", "token_type": "bearer", "expires_in": 1200, "scope": " sample_read sample_write"}POST example.com/oauth2/revoke HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedtoken=7ee85874dde4c7235b6c3afc82e3fb&token_type_hint=access_token&client_id=625bc9f6-3bf6-4b6d-94ba-e97cf07a22de&client_secret=625bc123-3bf6-4b6d-94ba-e97cf07a22dehttp://<APIM_SERVERNAME>:port/oauth2/auth?client_id=<Application Client ID>&response_type=token&scope=<list of scopes delimited by string>&state=<random string>For example,http://example.com/oauth2/auth?client_id=9a42a56d5b5546079f2f82a62612dab9&response_type=token&state=nkj34898sdcsd123&scope=foo_read%20foo_writeRequest Parameter | Description of the parameter |
response_type | This parameter identifies this grant type flow. The value is token. |
client_id | This parameter uniquely identifies the application. The client id can be found in the API Manager application. |
state | This parameter is an opaque pseudo-random string value used by the client application to maintain state between the initial authorization request and callback. The parameter prevents cross-site request forgery. Store the scope locally when the flow starts after which can be used later for comparison. |
Scope (optional) | Specifies the list of scopes required for the access token. If multiple scopes are required, specify the scopes as a space delimited string. |
URL Fragment Parameter | Description of the parameter |
access_token | The requested access token that can be used to call the protected API. |
token_type | Specifies the type of the requested access token. Currently the API Manager supports bearer tokens only so the value is Bearer. |
expires_in | The lifetime, in seconds, of the access token. The access token lifetime can be configured by changing the access token lifetime in API Manager application. |
client_id | Client id of the application for which the access token is issued. |
state | An opaque pseudo-random string value used by the client application to maintain state between the initial authorization request and callback. The parameter is used to prevent cross-site request forgery. |
scope (optional) | The granted/approved scopes associated with the requested access token. |
POST example.com/oauth2/revoke HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedtoken=7ee85874dde4c7235b6c3afc82e3fb&token_type_hint=access_tokenhttp://example.com/oauth2/auth?client_id=9a42a56d5b5546079f2f82a62612dab9&response_type=code&state=nkj34898sdcsd123&scope=foo_read%20foo_writeRequest Parameter | Description of the parameter |
response_type | The parameter identifies the flow of the grant type. The value is code. |
client_id | The Client Id of the application which uniquely identifies the application. The client id can be found in the API Manager application. |
state | An opaque pseudo- random string value used by the client application to maintain state between the initial authorization request and callback. The parameter is used to prevent cross-site request forgery. Store the state in a server-side session for comparing it later. |
scope (optional) | Specifies the list of scopes required for the access token. If multiple scopes are required, specify the scopes as a space delimited string. |
POST example.com/oauth2/token HTTP/1.1Host: server.example.comContent-Type: application/x-www-form-urlencodedgrant_type=authorization_code&client_id=9a42a56d5b5546079f2f82a62612dab9&client_secret=7ee85874dde4c7235b6c3afc82e3fb{"access_token": "95d9c3de53a9c48e629ecb6a288f6c","token_type": "bearer","expires_in": 1200,"scope": "foo_read","refresh_token": "31cf059933238e866779a43237cd7ec"}JSON Key | Description of the Key |
access_token | The requested access token which can be used to call the protected API. |
token_type | Specifies the type of the requested access token. Currently API Manager supports bearer tokens only so the value is Bearer. |
expires_in | The lifetime in seconds of the access token. The access token lifetime can be configured by changing the access token lifetime in API Manager application. |
client_id | Client Id of the application for which the access token is issued. |
State | An opaque pseudo- random string value used by the client application to maintain state between the initial authorization request and callback. The parameter is used to prevent cross-site request forgery. |
scope | The Granted/Approved scopes associated with the requested access token. |
refresh_token | Refresh token is a long-lived access token which is used to ask for a new access token. |
POST example.com/oauth2/token HTTP/1.1Host: server.example.comContent-Type: application/x-www-form-urlencodedgrant_type=refresh_token&refresh_token=31cf059933238e866779a43237cd7ec&client_id=3ffb313f16856a4d6b1feecd2e50b950&scope=foo_readPOST example.com/oauth2/revoke HTTP/1.1Host: example.comContent-Type: application/x-www-form- urlencoded token=7ee85874dde4c7235b6c3afc82e3fb&token_type_hint=access_tokenRequest Parameter | Description of the parameter |
grant_type | Specifies the requested grant type. To use this flow, the value is password. |
client_id | Client Id of the application which uniquely identifies the application. The client id can be found in the API Manager application. |
user name | End user provided user name |
password | End user provided password |
scope (optional) | Specifies the list of scopes required for the access token. If multiple scopes are required, specify the scopes as a space delimited string. |
POST /oauth2/token HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedgrant_type=password&username=maxwell&password=sdcoio2380&client_id= 95d9c3de53a9c48e629ecb6a288f6c&scope=foo_read%20foo_writeJSON Key | Description of the Key |
access_token | The requested access token which can be used to call the protected API. |
token_type | Specifies the type of the requested access token. Currently API Manager supports bearer tokens only so the value is Bearer. |
expires_in | The lifetime of the access token in seconds. The access token lifetime can be configured by changing the access token lifetime in API Manager. |
scope | The granted/approved scopes associated with the requested access token. |
refresh_token | Refresh token is a long-lived access token which is used to ask for a new access token. |
A sample JSON response is shown below:{ "access_token": "95d9c3de53a9c48e629ecb6a288f6c","token_type": "bearer","expires_in": 2800,"scope":"foo_read foo_write", "refresh_token": "31cf059933238e866779a43237cd7ec"}POST example.com/oauth2/token HTTP/1.1Host: server.example.comContent-Type: application/x-www-form-urlencodedgrant_type=refresh_token&refresh_token=31cf059933238e866779a43237cd7ec&scope=foo_readPOST example.com/oauth2/revoke HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedtoken=7ee85874dde4c7235b6c3afc82e3fb&token_type_hint=access_tokenAuthorization: Bearer <OAuth2 Access Token>GET example.com/sampleapi/v1.0/examples HTTP/1.1Host: example.comAuthorization: Bearer 7ee85874dde4c7235b6c3afc82e3fbAuthorization: BASIC Base64 (username:password)example: Authorization: Basic dm9yZGVsOnZvcmRlbA==GET example.com/sampleapi/v1.0/examples HTTP/1.1Host: example.comAuthorization: Basic dm9yZGVsOnZvcmRlbA==clientid: 3ffb313f16856a4d6b1feecd2e50b950