Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
phone_number | string | Yes | Phone number in international format (e.g., 255712345678) |
developer_app_id | string | Yes | ID of the developer app for OTP access |
Response Format
Successful Request:Best Practices
Phone Number Format
- Always use international format without spaces or special characters
- Include country code (e.g., 255 for Tanzania)
- Example:
255712345678
(not+255 71 234 5678
)
Error Handling
- Check the
success
field in the response - Handle developer app authentication errors
- Implement retry logic for network failures
- Log OTP request attempts for monitoring
Security Considerations
- Store
otp_id
securely for verification step - Don’t expose OTP IDs in logs or client-side code
- Implement rate limiting on your application side
- Validate phone numbers before making requests