/staff/auth/sign-in
Sign in with a password
Signs a staff member in with an email or Tanzanian phone and a password and answers 201 with the staff session body (camelCase keys). A digid support person signing in by email gets 200 with a choice_token and the organizations they may open instead. Errors: 401 invalid_credentials, 403 password_setup_required or no_workspace (with an onboarding_token), 429 after 10 attempts per 15 minutes.
Credential: None (public)
| Parameter | In | Type | Description |
|---|---|---|---|
| identifier* | body | string | Email, or a Tanzanian phone in any format. |
| password* | body | string | Password. |
| device_label | body | string | Labels the session in the sessions list, e.g. "Pixel 8" (up to 80 characters). |
| device_platform | body | string | ios, android or web. |
Example request
curl -X POST "https://digid-production.up.datahuru.com/api/v1/staff/auth/sign-in" \
-H "Content-Type: application/json" \
-d '{"identifier": "asha@example.com", "password": "correct horse battery", "device_label": "Pixel 8", "device_platform": "android"}'
Example response
{
"data": {
"token": "sid_ust_Zx8Kq2LmN4pR7tV1wY5bC9dF",
"actor": "staff",
"user": {
"id": "6f1c2a3b-4d5e-4f6a-8b7c-9d0e1f2a3b4c",
"name": "Asha Mwakyusa",
"email": "asha@example.com",
"phone": "+255712000001",
"role": "viewer",
"orgRole": "member"
},
"organizationId": "0b7e4c1a-2d3f-4e5a-8b9c-1d2e3f4a5b6c",
"organizationName": "Acme Fintech",
"organizationType": "business",
"branchId": "9d2a6b1c-3e4f-4a5b-9c8d-7e6f5a4b3c2d",
"branchName": "Central branch",
"setup": {"state": "ready"},
"permissions": ["read:branches", "read:approval_requests", "read:audit_log"],
"raises_approvals": true
}
}