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

HeaderValue
AuthorizationBearer token
Content-Typeapplication/x-www-form-urlencoded
Acceptapplication/json

📤 Request Body

No request body.


📥 Query Parameters

No query parameters.


📬 Response Fields

FieldTypeDescription
userIdstringUser ID
firstNamestringUser's first name
lastNamestringUser's last name
emailIdstringUser's email address
mobileNumberstringUser's mobile number
substringSubject 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.