Skip to content

OAuth Token API (1.0)

This API provides an OAuth 2.0 Client Credentials flow to obtain access tokens that are required to call secured endpoints.
The token is a JWT (JSON Web Token) with a limited lifetime.

Download OpenAPI description
Languages
Servers
https://api.sqr-group.com/

OAuth Token

— This API allows clients to obtain access tokens using the client credentials flow.

Operations

Get access token

Request

Request an access token using the Client Credentials Grant.
The access token is required for calling all secured APIs.

Bodyapplication/jsonrequired
client_idstringrequired

The client identifier issued during registration.

Example: "354z244b-2b83-4721-922b-9f9b4ba13059"
client_secretstringrequired

The client secret issued during registration.

Example: "secret"
grant_typestringrequired

Must be client_credentials for this flow.

Example: "client_credentials"
curl -i -X POST \
  https://api.sqr-group.com/oauth2/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "354z244b-2b83-4721-922b-9f9b4ba13059",
    "client_secret": "secret",
    "grant_type": "client_credentials"
  }'

Responses

Access token successfully generated.

Bodyapplication/json
access_tokenstringrequired

The JWT access token issued by the server.

Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
token_typestringrequired

Type of the token issued.

Example: "Bearer"
expires_inintegerrequired

Lifetime of the access token in seconds.

Example: 3600
scopestring

Granted scopes.

Example: "read:users write:logs"
Response
application/json
{ "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "expires_in": 3600, "scope": "read:users write:logs" }