Describe the current credential and its scopes
curl --request GET \
--url https://my.server.express/api/v1/auth/whoami \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.server.express/api/v1/auth/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>",
"role": "client",
"emailVerified": true,
"credential": "session",
"tokenName": "<string>",
"scopes": [
"services:read"
],
"admin": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Auth
Describe the current credential and its scopes
Who this credential is and what it may do. Accepts a browser session or an API token, with no particular scope required. A session reports every scope; a token reports its own. admin is true only for an ADMIN session, because admin routes never accept API tokens. This is informational — every route still enforces its own scope. Used by the MCP server to decide which tools to offer.
GET
/
v1
/
auth
/
whoami
Describe the current credential and its scopes
curl --request GET \
--url https://my.server.express/api/v1/auth/whoami \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.server.express/api/v1/auth/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>",
"role": "client",
"emailVerified": true,
"credential": "session",
"tokenName": "<string>",
"scopes": [
"services:read"
],
"admin": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}