Blueground API

Authentication

How to authenticate with the Blueground Properties API using OAuth 2.0 client credentials.

Overview

The Blueground Properties API uses OAuth 2.0 Client Credentials flow for authentication. Partners must obtain an access token from Keycloak and include it in every API request.

Obtaining an Access Token

Endpoint

POST https://api.theblueground.com/partners/authenticate

Body Parameters

ParameterRequiredDescription
grant_typeYesMust be client_credentials
client_idYesYour client ID provided by Blueground
client_secretYesYour client secret provided by Blueground
scopeYesMust be partner-info

Example Request

curl --location 'https://api.theblueground.com/partners/authenticate' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'client_id={CLIENT_ID}' \
  --data-urlencode 'client_secret={CLIENT_SECRET}' \
  --data-urlencode 'scope=partner-info'

Token Response

A successful request returns a JSON object containing the access token.

FieldTypeRequiredDescription
access_tokenstringYesThe Bearer token to include in API requests
expires_inintegerYesToken validity period in seconds
refresh_expires_inintegerYesRefresh token expiry. 0 means no refresh token issued
token_typestringYesAlways Bearer
not-before-policyintegerYesPolicy timestamp. Typically 0
scopestringYesScopes granted to the token
{
  "access_token": "<token>",
  "expires_in": 3600,
  "refresh_expires_in": 0,
  "token_type": "Bearer",
  "not-before-policy": 0,
  "scope": "email profile partner-info"
}

Using the Token

Include the access token in the Authorization header of every API request:

curl --location 'https://api.theblueground.com/partners/properties/details' \
  --header 'Authorization: Bearer {ACCESS_TOKEN}'

Token Expiry

Tokens are valid for 1 hour. Your client should request a new token before the current one expires. The expires_in field in the token response indicates the validity period in seconds.

On this page