Show the signed-in user
import requests
url = "https://platform.ankra.app/api/v1/auth/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/auth/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/auth/whoami \
--header 'Authorization: Bearer <token>'{
"user_data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {},
"auth0_data": {},
"getting_started": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"projects_enabled": true,
"project_access": "none"
},
"mfa_required": true,
"mfa_enrolled": true
}Account
Show the signed-in user
Returns the person or service account the API token belongs to, in the shape the browser session’s whoami answers: the stored profile (name, email, picture and the stored email_verified flag), preferences such as theme and technical details, the organisation the request acts in and the project the token acts in (its pin, else the organisation’s default). Any API token may ask, scoped or not. Nothing is refreshed from the identity provider, no cookie is set, and the MFA fields always report nothing to do.
GET
/
api
/
v1
/
auth
/
whoami
Show the signed-in user
import requests
url = "https://platform.ankra.app/api/v1/auth/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/auth/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/auth/whoami \
--header 'Authorization: Bearer <token>'{
"user_data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {},
"auth0_data": {},
"getting_started": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"projects_enabled": true,
"project_access": "none"
},
"mfa_required": true,
"mfa_enrolled": true
}Authorizations
Response
Successful Response