Authorization header, and revoke it when you are done.
Auth endpoints are rate-limited to 10 requests per minute to prevent brute-force attacks.
Token usage
Include your token in theAuthorization header on every request that requires authentication:
401 Unauthorized:
Register
Create a new traveller account. A Sanctum token is returned immediately so you can authenticate without a separate login step.Request parameters
First name. Maximum 100 characters.
Last name. Maximum 100 characters.
A unique, valid email address. Maximum 255 characters.
Must be at least 8 characters and contain mixed case and at least one number.
Must match
password exactly.Phone number including country code, e.g.
+255712345678. Maximum 20 characters. Optional.Response 201 Created
Confirmation message.
Plain-text Sanctum bearer token. Store this securely on the client.
Login
Authenticate with email and password. Any existingmobile-app tokens for the account are revoked before a new one is issued, so each login produces exactly one active token.
Request parameters
The registered email address.
The account password.
Response 200 OK
"Login successful."The authenticated user object (same shape as registration response).
Plain-text bearer token to use in the
Authorization header.Get current user
Return the profile of the user who owns the token. Useful for validating that a stored token is still active.Response 200 OK
The authenticated user object.
Logout
Revoke the token used in this request. Use this when the user logs out of the current device.Response 200 OK
Logout all devices
Revoke every token associated with the authenticated account. Use this when the user wants to sign out everywhere, for example after a suspected account compromise.Response 200 OK
Error reference
| Status | Scenario | Example message |
|---|---|---|
401 | Wrong email or password | "Invalid credentials." |
401 | Missing or revoked token | "Unauthenticated." |
403 | Account suspended | "Your account has been suspended." |
422 | Validation failure | Field-level errors object |
429 | Rate limit hit | "Too Many Attempts." |