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.
Authorization
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_idstringrequiredThe UUID of the project.
Request Body
codestringrequiredThe 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
| Field | Meaning |
|---|---|
access_token_id, membership_id | Identifiers for the token and resulting membership. |
membership_start_date, membership_end_date | Unix milliseconds; end date is null for lifetime access. |
already_claimed | This code already granted access to this member. No second extension occurred. |
fulfillment_pending | Platform access delivery is pending. A membership is not itself a channel join. |
billing_pending | When 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.