/
REST Other OAuth2 Token API

REST Other OAuth2 Token API

?.?.?

The OAuth2 Token REST API can be used to generate a JWT for authenticating calls to other ServiceBroker APIs, as an alternative to authentication via a System Access Tokens.

See the REST Integration Authentication page for more details on the two different means of authenticating ServiceBroker API calls. 

In order to use the OAuth2 Token API, the ServiceBroker Tenant needs to be specifically configured for JWT authentication. 

Please see the REST Integration Authentication page for more details.

Resource URL Summary

Obtain a JWT for authenticating other API calls

POST /up/v5/oauth2/accessToken

HTTP Headers

This API uses the standard ServiceBroker Content-Type HTTP Header, but does not use the standard Authorization header.


API Specifics

Obtain a JWT for authenticating other API calls

This REST API will return a JWT for use in authenticating other ServiceBroker API calls.

URL

POST /up/v5/oauth2/accessToken

HTTP Request Body

This request requires an OAuth2 Token Request object supplied in the HTTP request body.

HTTP Response

Success

On success, an HTTP response code of 200 will be returned, and the response body will be a JSON object of the following format:

{
  "access_token": "...",
  "token_type": "bearer",
  "expires_in": 60
}

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Related content

REST Objects OAuth2 Token Request
REST Objects OAuth2 Token Request
More like this
REST Other OAuth2 User Info API
REST Other OAuth2 User Info API
More like this
REST Integration Authentication
REST Integration Authentication
More like this
Create JWT REST API
Create JWT REST API
More like this