Skip to content

Onboarding Flow

  1. App backend calls POST /v1/link-token with user_id.
  2. Gateway returns token, expires_at, and deep_link.
  3. End-user opens deep link and triggers /start <token>.
  4. Gateway validates token from KV and upserts (developer_id, app_user_id) -> tg_chat_id in D1.
  5. Link token is deleted (single-use).
  • 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.