Dashboard
APISubscription Bot Access Token API | BotSubscription

Subscription Bot Access Tokens

Access tokens grant a plan without a checkout. Use them to distribute prepaid access to your Telegram subscription bot or Discord subscription bot.

These are single-use membership codes, separate from the API keys used to authenticate requests. Codes, activation tickets, and claim links are bearer secrets: store and distribute them privately.

All routes use the prefix /v2/projects/{project_id}/access-tokens and the standard API authentication and response envelope.

Issue subscription bot access tokens

  1. Prepare an inactive batch for a plan and save the returned codes and activation ticket.
  2. Activate the saved batch with the same authenticated user or API key before the ticket expires.
  3. Distribute activated codes privately. Members can claim their own codes, or an authorized integration can redeem a code for a named member.

The activation ticket expires 30 minutes after preparation. Durations begin when a code is claimed. Save codes before activation: the list endpoint never returns plaintext codes.

Access-token endpoints

Each endpoint has its own parameters, request examples, responses, and API playground.

MethodEndpoint referencePurpose
POSTPrepare TokensPrepare an inactive batch and capture its codes.
POSTActivate TokensActivate a batch using its saved ticket.
GETList TokensRead metadata and filter by status, plan, creator, claimant, or dates.
GETCheck EligibilityPreview whether the requested batch size can be generated.
DELETERevoke TokenDisable an unused code without terminating a membership.
POSTClaim TokenClaim a code for the signed-in user's linked identity.
POSTRedeem for MemberApply a code to a member selected by an admin or integration.

Authorization

OperationHuman admin permissionRestricted project-key scope
Prepare, activate, eligibilitymemberships:addaccess-tokens:create
Listmemberships:readaccess-tokens:read
Revokememberships:deleteaccess-tokens:revoke
Redeem for a named membermemberships:addaccess-tokens:redeem
Claim for yourselfSigned-in user with a linked platform identityAPI keys are rejected, including unrestricted keys

Project keys act only in their own project. The project's web-channel setting also applies to signed-in callers.

Claim and redemption outcomes

A membership grant and delivery of platform access are separate steps. A response can report pending billing or pending fulfillment.

The claim and redemption endpoint pages explain their response fields and retry behavior. Recover an uncertain result with the same code and member so the duration is never granted twice.

Last updated: