Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Current »

?.?.?

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.

  • No labels