#
Client credentials grant
#
Introduction
Client credentials grant is used for authorizing the client and not a specific user.
This is currently only used in the scenario where one creates a signup in the Signup API:
It is described in detail in section 4.4 of the OAuth2 specification.
It consists of the following steps:
- The client makes a request to obtain an
access_token
using the client credentials. - The received
access_token
can then be used to make API requests.
The different steps are described in detail below.
#
Obtaining an access token
To obtain a new access_token
, the following URL should be used:
Required query parameters:
Required headers:
#
Example
Example with curl
curl https://auth.pageroonline.com/oauth2/token \
-d grant_type=client_credentials \
--user 'client_id:client_secret'
The response will contain a JSON body that looks like this:
{
"scope": "all",
"access_token": "7367e3e0-eb0a-4abe-95ce-83363c27eaa2",
"token_type": "bearer",
"expires_in": 600,
}
#
Making an API request using an access token
When making an API request, the access_token
should be provided in an Authentication header as a bearer token.
#
Example
Example with curl
curl https://api.pageroonline.com/someresource \
-H 'Authorization: Bearer 7367e3e0-eb0a-4abe-95ce-83363c27eaa2'