Client Credentials Flow
The Client Credentials Flow is used for external clients to fetch an access token to use with the Switch API.
Last updated
Was this helpful?
The Client Credentials Flow is used for external clients to fetch an access token to use with the Switch API.
Last updated
Was this helpful?
The Client Credentials Flow (as defined in ) involves an application exchanging its application credentials, such as and , for an access token.
This flow is best suited for Machine-to-Machine (M2M) applications, such as CLIs, daemons, or backend services, because the system must authenticate and authorize the application instead of a user.
Client application sends application's credentials to the Authorization Server.
The Authorization Server validates application's credentials.
The Authorization Server responds with an access token.
The client application can use the access token to call the API on behalf of itself.
The API responds with requested data.
Following are the request parameters needed when making the fetch access token call to the authorization server.
grant_type
(required)
Must be set to client_credentials
.
client_id
(required)
The client application ID.
client_secret
(required)
The client application secret.
audience
(required)
The audience for the token, which is in fact the Switch API.
The following is an example authorization code grant request the Authorization Server would receive.
If all goes well, you'll receive an HTTP 200
response with a payload containing access_token
, token_type
, and expires_in
values:
The Client Credentials flow is used by the platform whose secrets can be managed by the organization administrators.