Headers:
Body:
Path Parameters:
Query Parameters:
200 OK
400
401
500
{ "error": "Detailed error message here"} Copy
{ "error": "Detailed error message here"}
POST /auth/token{ "grant_type": "client_credentials", "scope": "read:messages", "client_id": "your_client_id", "client_secret": "your_client_secret"} Copy
POST /auth/token{ "grant_type": "client_credentials", "scope": "read:messages", "client_id": "your_client_id", "client_secret": "your_client_secret"}
{ "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 3600, "provider": "cognito-s2s"} Copy
{ "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 3600, "provider": "cognito-s2s"}
The API Gateway event containing the request.
A Promise resolving to an API Gateway-compatible response.
POST /auth/token – Handles token generation requests for client credentials flow.
📥 Request
Headers:
Body:
Path Parameters:
Query Parameters:
📤 Response
200 OK– JSON stringified object representing the generated token. See GetTokenResponse.❗ Errors
400401500Error Response Format
📦 Examples
📥 Request
📤 Response Example