Machine-to-Machine (M2M) 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
- Your app authenticates with the Auth0 Authorization Server using its Client ID and Client Secret (/token endpoint).
- Your Auth0 Authorization Server validates the Client ID and Client Secret.
- Your Auth0 Authorization Server responds with an Access Token.
- Your application can use the Access Token to call an API on behalf of itself.
- The API responds with requested data.
How to implement it
The easiest way to implement the M2M Flow is to follow our Machine-to-Machine Quickstarts.
You can also follow our tutorial to use our API endpoints to Call Your API Using the M2M Flow.