Get the authenticated user
curl --request GET \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"user_type": {
"id": 123,
"name": "<string>",
"code": "<string>",
"can_access_clinical_processes": true
},
"can_access_clinical_processes": true,
"branches": [
{
"id": 123,
"organization_id": 123,
"name": "<string>",
"code": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": "<string>",
"is_active": true,
"is_primary": true
}
],
"departments": [
{
"id": 123,
"branch_id": 123,
"name": "<string>",
"code": "<string>",
"is_primary": true
}
],
"clinics": [
{
"id": 123,
"branch_id": 123,
"department_id": 123,
"name": "<string>",
"code": "<string>",
"supports_outpatient": true,
"supports_inpatient": true,
"is_active": true,
"is_primary": true
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Foundation
Get the authenticated user
Returns the authenticated user and assigned access context. Requires hmis:read.
GET
/
me
Get the authenticated user
curl --request GET \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"user_type": {
"id": 123,
"name": "<string>",
"code": "<string>",
"can_access_clinical_processes": true
},
"can_access_clinical_processes": true,
"branches": [
{
"id": 123,
"organization_id": 123,
"name": "<string>",
"code": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": "<string>",
"is_active": true,
"is_primary": true
}
],
"departments": [
{
"id": 123,
"branch_id": 123,
"name": "<string>",
"code": "<string>",
"is_primary": true
}
],
"clinics": [
{
"id": 123,
"branch_id": 123,
"department_id": 123,
"name": "<string>",
"code": "<string>",
"supports_outpatient": true,
"supports_inpatient": true,
"is_active": true,
"is_primary": true
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}⌘I