Get user profile
GET
/api/v1/protected/profile
const url = 'https://localhost:8080/api/v1/protected/profile';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://localhost:8080/api/v1/protected/profile \ --header 'Authorization: <Authorization>'Return the authenticated user’s profile and resolved IDP user ID from their JWT
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”User profile information
Media type application/json
object
message
string
user
userId
string
Example
{ "message": "Profile retrieved", "userId": "550e8400-e29b-41d4-a716-446655440000"}Unauthorized - Invalid or missing credential
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}