Journey Docs
Members APIAuthentication

Get SMS Countries

Get supported countries for SMS verification

GET/members/me/auth/accepted-sms-countries

Overview

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

200 Response
[
  "US",
  "CA"
]

Usage

Use this endpoint to:

  1. Validate phone numbers before OTP requests
  2. Show country picker with only supported countries
  3. Display helpful errors when unsupported numbers are entered
  4. 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.

On this page