# Authentication

Exchange client credentials for a five-minute access token and inspect it.

 - [POST /oauth/token](https://developer.boyahq.com/v2/openapi/auth/v2createtoken.md): OAuth2 client-credentials grant. Send credentials with HTTP Basic or in the form body, never both. Tokens last 300 seconds and are not cached (`Cache-Control: no-store`). A wrong secret always answers
 - [GET /.well-known/jwks.json](https://developer.boyahq.com/v2/openapi/auth/v2getjwks.md): JSON Web Key Set (RFC 7517) with the RSA public keys that sign Boya API v2 access tokens and the service tokens Boya sends to its own services, current and previous. Match a token's `kid` header to a
 - [GET /auth/context](https://developer.boyahq.com/v2/openapi/auth/v2getauthcontext.md): Returns the client, business, environment and scopes the token authorizes. Diagnostic only.
