Skip to content

Feat/africas talking sms provider#2619

Open
ianSurii wants to merge 4 commits into
supabase:masterfrom
ianSurii:feat/africas-talking-sms-provider
Open

Feat/africas talking sms provider#2619
ianSurii wants to merge 4 commits into
supabase:masterfrom
ianSurii:feat/africas-talking-sms-provider

Conversation

@ianSurii

@ianSurii ianSurii commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Adds Africa's Talking as a first-class SMS OTP provider, following the same pattern as the existing Vonage, Messagebird and Textlocal providers.

Motivation

Africa's Talking is the dominant SMS gateway across Kenya, Nigeria, Ghana, Tanzania, Uganda and Rwanda — regions where none of the currently supported providers offer affordable or reliable coverage. This is a gap that affects a significant portion of the African developer community building on Supabase.

Changes

  • internal/api/sms_provider/africas_talking.go — provider implementation
  • internal/conf/configuration.goAfricasTalkingProviderConfiguration struct + Validate()
  • internal/api/sms_provider/sms_provider.go — factory case "africas_talking"
  • example.env — env var placeholders

Configuration

Variable Description
GOTRUE_SMS_PROVIDER Set to africas_talking
GOTRUE_SMS_AT_API_KEY Your Africa's Talking API key
GOTRUE_SMS_AT_USERNAME AT app username (sandbox for testing)
GOTRUE_SMS_AT_SENDER_ID Optional sender name; leave empty for shared shortcode

Testing

  • 7 unit tests (validation, sandbox/production endpoint selection, successful send, WhatsApp channel rejection, delivery failure)
  • Live-tested against the AT sandbox — message delivered successfully

Notes

I'm aware of the current policy on new SMS providers. Given the regional significance of Africa's Talking for African developers on Supabase, I'm submitting this in hopes it warrants an exception — or at minimum serves as a reference implementation once the generic provider path is ready.

ianSurii added 3 commits July 8, 2026 20:07
Add Africa's Talking as an SMS OTP provider for phone auth:
- New AfricasTalkingProvider implementing the SmsProvider interface
  (SendMessage/VerifyOTP), with sandbox/production endpoint selection.
- AfricasTalkingProviderConfiguration in conf, wired under
  SMS config with the GOTRUE_SMS_AT_* env prefix.
- Register 'africas_talking' in the GetSmsProvider factory.
- Unit tests covering validation, successful send, whatsapp
  rejection, and delivery failure.
Africa's Talking requires the header name to be exactly 'apiKey'.
Go's http.Header.Set canonicalises to 'Apikey', causing 401s.
Switch to req.Header["apiKey"] direct assignment to preserve casing.

Also clears GOTRUE_SMS_AT_SENDER_ID for sandbox — the AT sandbox
rejects custom sender IDs; leave empty to use the shared shortcode.
Add GOTRUE_SMS_AT_API_KEY, GOTRUE_SMS_AT_USERNAME, and
GOTRUE_SMS_AT_SENDER_ID placeholders to example.env so operators
know which env vars to set when using the africas_talking provider.
@ianSurii ianSurii requested a review from a team as a code owner July 8, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant