Skip to content


Client Credentials Flow


This is the OAuth 2.0 grant that server processes use to access the Blooma API. Use this endpoint to directly request an Access Token by using your Client's credentials (a Client ID and a Client Secret) provided by Blooma for your API integration.

All data requests made to Blooma API endpoints must include a valid Access Token returned from this endpoint in the request header.

How to obtain client credentials

Reach out to your Blooma CX Manager to get Client credentials that can be used to authenticate your API integration with Blooma's APIs.


grant_type string

Denotes the flow you are using. Should always be client_credentials.

audience string

The unique identifier of the target API you want to access. This will be in the format of {BASE_URL}/api/ for your dedicated Blooma instance.

client_id string

Your application's Client ID.

client_secret string

Your application's Client Secret.


Content-Type: application/x-www-form-urlencoded

curl --request POST \
    --url '' \
    --header 'content-type: application/json' \
    --data "{
        \"client_id\": \"${YOUR_CLIENT_ID}\",
        \"client_secret\": \"${YOUR_CLIENT_SECRET}\",
        \"audience\": \"${BASE_URL}/api/\",
        \"grant_type\": \"client_credentials\"
HttpResponse<String> response ="")
    .header("content-type", "application/json")
var client = new RestClient("");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"client_id\":\"YOUR_CLIENT_ID\",\"client_secret\":\"YOUR_CLIENT_SECRET\",\"audience\":\"BASE_URL/api/\",\"grant_type\":\"client_credentials\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var request = require("request");

var options = {
    method: 'POST',
    url: '',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    form: {
        client_id: YOUR_CLIENT_ID,
        client_secret: YOUR_CLIENT_SECRET,
        audience: `${BASE_URL}/api/`,
        grant_type: 'client_credentials'

request(options, function (error, response, body) {
    if (error) throw new Error(error);

import json
import http.client

conn = http.client.HTTPSConnection("")

payload = {
    "client_id": YOUR_CLIENT_ID,
    "client_secret": YOUR_CLIENT_SECRET,
    "audience": f"{BASE_URL}/api/",
    "grant_type": "client_credentials"

headers = { "content-type": "application/json" }

conn.request("POST", "/oauth/token", json.dumps(payload), headers)

res = conn.getresponse()
data =


200 OK




    "access_token": "eyJz93a...k4laUWw",
    "token_type": "Bearer",
    "scope": "USER",
    "expires_in": 86400

You can then use the returned token_type and access_token to access the Blooma API by including the following header in subsequent requests.

Header Sample
Authorization: Bearer eyJz93a...k4laUWw

Last update: 2023-07-14