Verify a patient OTP
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify \
--header 'Content-Type: application/json' \
--data '
{
"challenge_id": "<string>",
"phone": "0712345678",
"code": "123456",
"device_name": "Derrick Android",
"patient_number": "<string>",
"date_of_birth": "2023-12-25"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
challenge_id: '<string>',
phone: '0712345678',
code: '123456',
device_name: 'Derrick Android',
patient_number: '<string>',
date_of_birth: '2023-12-25'
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify"
payload = {
"challenge_id": "<string>",
"phone": "0712345678",
"code": "123456",
"device_name": "Derrick Android",
"patient_number": "<string>",
"date_of_birth": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"token_type": "Bearer",
"access_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"patient": {}
}Patient authentication
Verify a patient OTP
Verifies the challenge once and issues a device-bound Sanctum token. Shared phone numbers require patient number and date of birth.
POST
/
patient
/
auth
/
otp
/
verify
Verify a patient OTP
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify \
--header 'Content-Type: application/json' \
--data '
{
"challenge_id": "<string>",
"phone": "0712345678",
"code": "123456",
"device_name": "Derrick Android",
"patient_number": "<string>",
"date_of_birth": "2023-12-25"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
challenge_id: '<string>',
phone: '0712345678',
code: '123456',
device_name: 'Derrick Android',
patient_number: '<string>',
date_of_birth: '2023-12-25'
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/auth/otp/verify"
payload = {
"challenge_id": "<string>",
"phone": "0712345678",
"code": "123456",
"device_name": "Derrick Android",
"patient_number": "<string>",
"date_of_birth": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"token_type": "Bearer",
"access_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"patient": {}
}Body
application/json
Example:
"0712345678"
Pattern:
^\d{6}$Example:
"123456"
Maximum string length:
100Example:
"Derrick Android"
Required with date_of_birth when the phone is shared.