Client Credentials Flow
With machine-to-machine (M2M) applications, such as CLIs, daemons, or services running on your back-end, the system authenticates and authorizes the app rather than a user. For this scenario, typical authentication schemes like username + password or social logins don't make sense. Instead, M2M apps use the Client Credentials Flow (defined in OAuth 2.0 RFC 6749, section 4.4), in which they pass along their Client ID and Client Secret to authenticate themselves and get a token.
How it works
The application authenticates with the Auth0 Authorization Server using its Client ID and Client Secret (
Auth0 Authorization Server validates the Client ID and Client Secret.
Auth0 Authorization Server responds with an Access Token.
The application can use the access token to call an API on behalf of itself. For more information on this process, see Validate JSON Web Tokens.
The API responds with requested data.
How to implement it
The easiest way to implement the Client Credentials Flow is to follow our Backend Quickstarts.
You can also follow our tutorial to use our API endpoints to Call Your API Using the Client Credentials Flow.