Members APIAuthentication
Get SMS Countries
Get supported countries for SMS verification
GET
/members/me/auth/accepted-sms-countriesOverview
Returns a list of country codes where SMS OTP verification is supported. This endpoint is public (no authentication required) and can be used to validate user phone numbers before attempting OTP verification.
Authentication
None required - this is a public endpoint.
Request
curl -X GET "http://localhost:3000/v1/members/me/auth/accepted-sms-countries"Response
Returns an array of ISO 3166-1 alpha-2 country codes where SMS OTP is supported.
Response
[
"US",
"CA"
]Usage
Use this endpoint to:
- Validate phone numbers before OTP requests
- Show country picker with only supported countries
- Display helpful errors when unsupported numbers are entered
- Cache the list (it changes infrequently)
Example Implementation
// Check if phone number is from supported country
const supportedCountries = await fetch('/members/me/auth/accepted-sms-countries')
.then(r => r.json());
function isPhoneSupported(phoneNumber: string): boolean {
// Extract country code from E.164 format
const countryCode = getCountryCodeFromPhone(phoneNumber);
return supportedCountries.includes(countryCode);
}
// Usage in form validation
if (!isPhoneSupported(userPhone)) {
showError('SMS verification not available in your country. Please use email instead.');
}Current Coverage
Currently supports:
- US - United States
- CA - Canada
Additional countries may be added based on SMS provider coverage and compliance requirements.
Related Endpoints
- Get OTP Status - Check SMS delivery status
- Add Verified Contact - Verify contact after OTP