Dashboard
APISubscription Bot Access Token Claim API
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Mock
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Claim a Subscription Bot Access Token

Claim a code for the signed-in member of your Telegram subscription bot or Discord subscription bot. The recipient comes from the caller's linked platform identity.

POST/v2/projects/{project_id}/access-tokens/claim

Authorization

Bearer TokenRequired

Requires a user JWT with a linked Telegram or Discord identity. Every API key is rejected, including unrestricted project keys. No recipient override is accepted.

Path Parameters

project_idstringrequired

The UUID of the project.

Request Body

codestringrequired

The access code issued for this project.

Claim behavior and limits

Requires a user JWT and the caller's linked Telegram or Discord identity. It accepts no recipient selector. API keys cannot call it. The limit is 10 requests per minute per user and project.

Response fields

FieldMeaning
access_token_id, membership_idIdentifiers for the token and resulting membership.
membership_start_date, membership_end_dateUnix milliseconds; end date is null for lifetime access.
already_claimedThis code already granted access to this member. No second extension occurred.
fulfillment_pendingPlatform access delivery is pending. A membership is not itself a channel join.
billing_pendingWhen true, billing must settle before additional access is granted; response status is 202.

Existing access to the same plan is extended according to its membership rules. Recurring billing may need provider confirmation before the extension is granted. With 202, the returned dates describe existing access, not a completed new grant.

Retry the same code for the same member to recover an uncertain or pending result. A completed retry returns the original receipt with already_claimed: true. A different member receives 404. Wait for an in-flight request to finish before retrying; concurrent attempts can temporarily return 404 or 409.

For billing_pending, retry the same request or list by status to check progress. For fulfillment_pending, resolve platform access prerequisites, such as starting the Telegram bot or joining the configured Discord server, then retry the same code. Delivery can repeat after a lost acknowledgement, but retries never grant the duration twice.

For a server integration that names another member, use Redeem for Member. See the Access Tokens overview for issuance and credential requirements.

Last updated: