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
- Prepare an inactive batch for a plan and save the returned codes and activation ticket.
- Activate the saved batch with the same authenticated user or API key before the ticket expires.
- 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.
| Method | Endpoint reference | Purpose |
|---|---|---|
POST | Prepare Tokens | Prepare an inactive batch and capture its codes. |
POST | Activate Tokens | Activate a batch using its saved ticket. |
GET | List Tokens | Read metadata and filter by status, plan, creator, claimant, or dates. |
GET | Check Eligibility | Preview whether the requested batch size can be generated. |
DELETE | Revoke Token | Disable an unused code without terminating a membership. |
POST | Claim Token | Claim a code for the signed-in user's linked identity. |
POST | Redeem for Member | Apply a code to a member selected by an admin or integration. |
Authorization
| Operation | Human admin permission | Restricted project-key scope |
|---|---|---|
| Prepare, activate, eligibility | memberships:add | access-tokens:create |
| List | memberships:read | access-tokens:read |
| Revoke | memberships:delete | access-tokens:revoke |
| Redeem for a named member | memberships:add | access-tokens:redeem |
| Claim for yourself | Signed-in user with a linked platform identity | API 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.