API Documentation
API Documentation

Client Credentials

This is the OAuth 2.0 grant that server processes utilize in order to access an API. Use this endpoint to directly request an Access Token by using the Client Credentials (a Client ID and a Client Secret).

The BNC authentication endpoint is https://api.bravenewcoin.com/v3/oauth/token

REQUEST BODY SCHEMA: application/json
Audience Description
https://api.bravenewcoin.comAccess the Rest API
wss://ws.bravenewcoin.comSubscribe to the Websocket Stream

200 The Authentication Response

Payload
curl
node
Payload

Request Samples

Content Type: Application/json

{
      "grant_type": "client_credentials",
      "client_id": "string",
      "client_secret": "string",
      "audience": "https://api.bravenewcoin.com"
}

Response Samples


200

{
    "access_token": "string",
    "scope": "string",
    "expires_in": 0,
    "token_type": "string"
}
curl
Request Samples
curl -X POST https://api.bravenewcoin.com/v3/oauth/token -H 'Content-Type: application/json' -d '
{
      "grant_type": "client_credentials",
      "client_id": "your client id",
      "client_secret": "your client secret",
      "audience": "https://api.bravenewcoin.com"
}'

Response Samples

200

Content Type

Application /json

{

    "access_token": "string",

     "scope": "string",
     "expires_in": 0,
      "token_type": "string"
}
node

Request Samples

varrequest =require("request");


varoptions= {
  method: 'POST',
  url: 'https://api.bravenewcoin.com/v3/oauth/token',
  headers: {
    'Content-Type': 'application/json'
  },
  body: {
    grant_type: 'client_credentials',
    client_id: 'your client id',
    client_secret: 'your client secret',
    audience: 'requested audience'
  },
  json: true
};
request(options, function (error, response, body) {
  if (error) {
    throw newError(error);
  }


  letaccess_token= body.access_token;


});

Response Sample

200

Content Type
Application/json
{
      "access_token": "string",
      "scope": "string",
      "expires_in": 0,
      "token_type": "string"
}