Bonterra API Endpoints (0.1.50)

Download OpenAPI specification:

This file contains the global endpoints for the Bonterra API

Oauth2

OAuth 2.0 authorization flow operations including token generation, introspection, revocation, and user information retrieval.

Generate OAuth token

This endpoint is used to generate an OAuth token by redirecting the request to Bonterra Auth's token endpoint.

header Parameters
Content-Type
required
string
Default: application/json

Content type header

Request Body schema: application/json
required

Token request

grant_type
required
string

The grant type of the token request. Accepted values are 'client_credentials', 'authorization_code' and 'refresh_token'.

client_id
string

The client id provided by the Bonterra API application.

client_secret
string

The client secret provided by the Bonterra API application.

audience
string

Required parameter that identifies the API you want to access. Use the API origin (https://api.bonterra.network) as the audience value.

scope
string

The scope of the token request.

redirect_uri
string

The redirect uri provided by the Bonterra API application, this is used for standalone management API.

refresh_token
string

The refresh token provided by the Bonterra API application.

code
string

The authorization code returned by the /authorize call.

code_verifier
string

The code verifier provided by the Bonterra API application (for PKCE).

Responses

Response Schema: application/json
access_token
required
string

The access token issued by the authorization server.

expires_in
required
string

The lifetime in seconds of the access token.

token_type
required
string

The type of the token issued.

refresh_token
string

The refresh token issued by the authorization server.

id_token
string

The id token issued by the authorization server.

Request samples

Content type
application/json
{
  • "grant_type": "string",
  • "client_id": "string",
  • "client_secret": "string",
  • "audience": "string",
  • "scope": "string",
  • "redirect_uri": "string",
  • "refresh_token": "string",
  • "code": "string",
  • "code_verifier": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "expires_in": "string",
  • "token_type": "string",
  • "refresh_token": "string",
  • "id_token": "string"
}