Getting Access token via Client Credentials Grant Type

Getting Access token via Client Credentials Grant Type

The Client Credentials grant type is preffered when you are requesting an access token via a technical platform/system (via scripting), where the end-user identity is not known.

Endpoint URL: <token_endpoint>

Example: https://api.vanmarcke.com/v1/oauth/token

Authorization header: Basic authentication

  • Username: <client_id> (received after Application registration)

  • Password: <client_secret>(received after Application registration)

HTTP Headers:

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

HTTP Body: (x-www-form-urlencoded):

  • grant_type: client_credentials 

Example implementation in Postman

Postman (https://www.postman.com/) is a client tool that allows you to easily test APIs.

 

Related content