Onboarding Flow
- App backend calls
POST /v1/link-tokenwithuser_id. - Gateway returns
token,expires_at, anddeep_link. - End-user opens deep link and triggers
/start <token>. - Gateway validates token from KV and upserts
(developer_id, app_user_id) -> tg_chat_idin D1. - Link token is deleted (single-use).
Important behavior
Section titled “Important behavior”- Link tokens expire after 15 minutes.
- Token payload stores a branding snapshot.
- Successful link automatically transitions user to phone verification pending and prompts contact-share.