Auth
Authentication endpoints
Obtain an access token via OAuth2 client credentials grant
Performs the OAuth2 client credentials grant on behalf of a machine client, exchanging a `clientId` and `clientSecret` for an access token scoped to this service's configured Auth0 audience. Use this endpoint for automated, non-interactive service accounts and background jobs that do not act on behalf of a human user; for human user login, use `POST /auth/login` instead. No prior authentication is required to call this endpoint. Both `clientId` and `clientSecret` are required and must be non-blank — the server returns 400 if either is missing or empty; this endpoint never falls back to the service's own configured Auth0 credentials, so a caller cannot obtain a token without supplying valid credentials of their own. On success, returns a JSON object containing `accessToken`, `expiresIn` (lifetime in seconds), and `tokenType` (always `Bearer`). Pass the token as `Authorization: Bearer <accessToken>` on subsequent requests.
Authenticate a human user with email and password
Exchanges a user's email address and password for a short-lived access token issued by Auth0's Resource Owner Password grant. Use this endpoint when a human user can supply interactive credentials directly; for non-interactive service accounts, use `POST /auth/client-credentials` instead. No prior authentication is required to call this endpoint. Both `email` and `password` must be present (non-null) in the request body — the server returns 400 if either is missing; Auth0 itself rejects blank or incorrect values with a 401. On success, returns a JSON object containing `accessToken` (a bearer token) and `expiresIn` (lifetime in seconds). Pass the token as `Authorization: Bearer <accessToken>` on subsequent requests.