Get the caller's own identity and roles
curl --request GET \
--url https://web-api.dev.soxai.site/app/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/app/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.dev.soxai.site/app/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uid": "user123",
"roles": [
"orgadmin"
],
"org_id": "org_ab12cd34"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Authentication
Get the caller's own identity and roles
Not callable with a Sandbox key
A request authenticated with a Sandbox soxai-api-key is answered 403 This endpoint is not available in the sandbox., because it is internal or operational, outside the Sandbox surface. It is published here because the Sandbox runs the same build; use it in Production. See Sandbox.
Report who the caller is, as the API sees them: their uid, the roles their token carries, and the organization their token names.
Useful for checking that a token carries the claims you expect before debugging a 403
elsewhere.
Parameters
- None. This endpoint takes no path, query or body parameter.
Response
200{"uid", "roles", "org_id"}.rolesis normalised to lower case, soAdminin the token reads asadminhere.org_idisnullfor a caller that belongs to no organization.
Errors
- None specific to this endpoint. The statuses every endpoint can answer with are listed at the top of this page.
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Any authenticated caller. The answer describes the caller’s own token and nobody else’s, so no role is required.
GET
/
app
/
me
Get the caller's own identity and roles
curl --request GET \
--url https://web-api.dev.soxai.site/app/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.dev.soxai.site/app/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.dev.soxai.site/app/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uid": "user123",
"roles": [
"orgadmin"
],
"org_id": "org_ab12cd34"
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Authorizations
HTTPBearerSoxaiApiKey
Response
The caller's own identity. roles is normalised to lower case, so Admin in the token reads as admin here, and org_id is null for a caller in no organization.