GET /users/{userId} – Retrieves user given the ID.
Headers:
Authorization: Bearer <access_token>
Content-Type: application/json or application/x-www-form-urlencoded
Body:
Path Parameters:
Query Parameters:
200 OK
400
401
404
500
{ "error": "Detailed error message here"} Copy
{ "error": "Detailed error message here"}
GET /users/user_123?provider=auth0-user Copy
GET /users/user_123?provider=auth0-user
GET /users/user_123?userPoolId=us-east-1_1234test&provider=cognito-user Copy
GET /users/user_123?userPoolId=us-east-1_1234test&provider=cognito-user
{ "id": "user_123", "email": "user@district123.com", "name": "John Doe", "blocked": false, "emailVerified": true, "createdAt": "2025-09-12T12:00:00Z", "updatedAt": "2025-09-12T12:00:00Z", "appMetadata": { // ...app metadata fields... }, "userMetadata": { // ...user metadata fields... } // Additional user fields} Copy
{ "id": "user_123", "email": "user@district123.com", "name": "John Doe", "blocked": false, "emailVerified": true, "createdAt": "2025-09-12T12:00:00Z", "updatedAt": "2025-09-12T12:00:00Z", "appMetadata": { // ...app metadata fields... }, "userMetadata": { // ...user metadata fields... } // Additional user fields}
The API Gateway event containing the request.
A Promise resolving to an API Gateway-compatible response.
GET /users/{userId} – Retrieves user given the ID.
📥 Request
Headers:
Authorization: Bearer <access_token>(required)Content-Type: application/json or application/x-www-form-urlencoded(required)Body:
Path Parameters:
Query Parameters:
📤 Response
200 OK– Returns a JSON-stringified User object.❗ Errors
400401404500Error Response Format
📦 Examples
📥 Auth0 Request
📥 Cognito Request
📤 Response Example