This API endpoint retrieves the user ID associated with the provided email address.
GET /api/getUserId
The API expects a JSON object with the following properties in the request body:
Property | Type | Required | Description |
---|---|---|---|
string | Yes | The user's email address. |
The API returns a JSON object with the following properties in the response body:
Property | Type | Description |
---|---|---|
userId | string | The ID of the user associated with the provided email address. |
- Status Code: 200 OK
- Body:
{
"userId": "123456789"
}
-
Status Code: 400 Bad Request
- Body:
{ "message": "User id is required" }
-
Status Code: 404 Not Found
- Body:
{ "message": "User not found" }
-
Status Code: 500 Internal Server Error
- Body:
{ "message": "Something went wrong", "error": "<error message>" }
GET /api/getUserId
Content-Type: application/json
{
"email": "user@example.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"userId": "123456789"
}