User Info
User Info
Endpoint:
POST /relid/authserver/oauth/userinfo
Description:
Retrieves information about the authenticated user associated with the provided access token. Useful for obtaining user profile attributes after login.
🔐 Authentication
Type: Bearer Token
Header Format:
Authorization: Bearer <access_token>
📥 Request Headers
Header | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/x-www-form-urlencoded |
Accept | application/json |
📤 Request Body
No request body.
📥 Query Parameters
No query parameters.
📬 Response Fields
Field | Type | Description |
---|---|---|
userId | string | User ID |
firstName | string | User's first name |
lastName | string | User's last name |
emailId | string | User's email address |
mobileNumber | string | User's mobile number |
sub | string | Subject of the token |
📘 Example Request (cURL)
curl 'https://auth.relid.com:8006/relid/authserver/oauth/userinfo' \
-X POST \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
📘 Example Response
{
"userId": "o4",
"firstName": "Test",
"lastName": "User",
"emailId": "[email protected]",
"mobileNumber": "",
"sub": "o4"
}
📝 Notes
- The endpoint returns information based on the access token's associated user.
- Requires the token to have
openid
scope or equivalent authorization.
Updated 3 months ago