Skip to content

fix: route the Messagebird provider to Bird API for bk_ keys - #2684

Draft
cxbitz wants to merge 1 commit into
supabase:masterfrom
cxbitz:fix/messagebird-bird-platform
Draft

fix: route the Messagebird provider to Bird API for bk_ keys#2684
cxbitz wants to merge 1 commit into
supabase:masterfrom
cxbitz:fix/messagebird-bird-platform

Conversation

@cxbitz

@cxbitz cxbitz commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #1830

MessageBird is now Bird, and accounts created on the new platform are issued bk_{region}_... keys. The provider posts form-encoded to rest.messagebird.com with AccessKey auth, which those keys are not valid for, so the legacy API answers 401 and phone auth silently never sends. #1554 hit the same thing earlier.

The fix routes on the key. A bk_{region}_ key goes to Bird's platform API, with the region read from the key itself; anything else keeps the legacy path unchanged, so existing accounts are untouched.

MessageBird is now Bird, and accounts created on the new platform are
issued bk_{region}_ keys for an API the provider does not speak: it posts
form-encoded to rest.messagebird.com with AccessKey auth, which those keys
are not valid for, so phone auth never sends for them (supabase#1830).

The access key now decides the API. A bk_{region}_ key is routed to
https://{region}.platform.bird.com/v1/sms/messages with bearer auth and a
JSON body; the region comes from the key, so no new configuration is
needed. Anything else keeps the legacy path byte for byte, so existing
accounts are untouched.

Bird requires a sender the workspace owns or has registered, which a new
workspace has neither of, so the originator becomes optional for a Bird
key: unset, the send uses Bird's stocked one-time-passcode template, which
selects a sender for the destination; set, it sends the configured
SMS_TEMPLATE text from that sender. Auth generates and verifies the code
in both cases, so this stays a plain sender and the OTP lifecycle is
unchanged.
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.

Messagebird's Rebranding to Bird makes Phone Auth Broken

1 participant