Get the authenticated user's profile information.
curl -X GET "https://your-auth-server.com/api/user/profile" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer user-token"{
"user": {
"id": "user_123456",
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe",
"role": "user",
"emailVerified": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}Update the authenticated user's profile information.
{
"firstName": "John",
"lastName": "Smith"
}curl -X PATCH "https://your-auth-server.com/api/user/profile" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer user-token" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Smith"
}'Change the authenticated user's password. Requires current password for security.
{
"currentPassword": "oldpassword123",
"newPassword": "newsecurepassword123",
"confirmPassword": "newsecurepassword123"
}curl -X POST "https://your-auth-server.com/api/user/change-password" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer user-token" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "oldpassword123",
"newPassword": "newsecurepassword123",
"confirmPassword": "newsecurepassword123"
}'Change the authenticated user's email address. Verification will be sent to the new email.
{
"newEmail": "newemail@example.com",
"password": "currentpassword123"
}curl -X POST "https://your-auth-server.com/api/user/change-email" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer user-token" \
-H "Content-Type: application/json" \
-d '{
"newEmail": "newemail@example.com",
"password": "currentpassword123"
}'