The client credentials grant is an OAuth 2.0 flow for machine-to-machine access. An application authenticates as itself to obtain authorization for calling a protected API, without a user interaction. section 25.7 section 25.1.3
Choose the grant type according to who initiates the access:
- Use client credentials when one API needs to call another API and no user is involved. section 25.1.3
- Prefer authorization code with PKCE for an interactive flow initiated by a user. section 25.7 section 25.1.3
- Treat other OAuth 2.0 grants as alternatives when the scenario does not match these common flows. section 25.1.3
A machine-only workflow
A scheduled service requests authorization and calls another API on its own behalf. Because no person initiates or consents to the interaction, client credentials fits the workflow. section 25.7




