# Check Subscription Bot Access Token Eligibility

> Read the optional Telegram and Discord subscription bot access-token policy preflight; current policy allows unlimited issuance.

Source: https://docs.botsubscription.com/api/access-tokens/eligibility/

Read the optional issuance-policy preflight for your <strong>Telegram subscription bot</strong> or <strong>Discord subscription bot</strong> project.

<ApiEndpoint method="GET" endpoint="/v2/projects/{project_id}/access-tokens/eligibility" />

<ApiAuthorization type="Bearer API Key" />

**API key scope:** `access-tokens:create` (required for restricted keys).

<ApiSection title="Path Parameters">
  <ApiParameter name="project_id" type="string" required description="The UUID of the project." />
</ApiSection>

<ApiSection title="Query Parameters">
  <ApiParameter name="count" type="integer" defaultValue="1" description="Requested batch size, from 1 to 100." />
</ApiSection>

## Optional preflight

You do not need to call this endpoint before creating codes. The issuance workflow is [Prepare Tokens](https://docs.botsubscription.com/api/access-tokens/prepare/) followed by [Activate Tokens](https://docs.botsubscription.com/api/access-tokens/activate/).

Current policy allows unlimited issuance; `remaining: null` means unlimited. There is no monthly, total, or unclaimed-token quota. The 100-code batch limit applies to a single request.

This check does not accept a plan or member and does not validate their eligibility, pricing, payment-provider setup, or platform access. It reserves nothing and does not guarantee activation. Preparation validates the selected plan; first activation checks the saved ticket, current plan, and issuance policy again.

Unknown query fields and invalid counts return `422`.

<ApiSamplePane>

<ApiRequestSample title="Request">

```bash
curl -X GET "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/access-tokens/eligibility?count=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript
const response = await fetch("https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/access-tokens/eligibility?count=10", {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  }
});
const result = await response.json();
```

```python
import requests

response = requests.get(
    "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/access-tokens/eligibility?count=10",
    headers={
        "Authorization": "Bearer YOUR_API_KEY"
    }
)
result = response.json()
```

```php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/access-tokens/eligibility?count=10');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
```

</ApiRequestSample>

<ApiResponseTabs>
  <ApiResponse status={200} description="Generation eligibility preview">

```json
{
  "ok": true,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/access-tokens/eligibility",
  "code": 200,
  "data": {
    "allowed": true,
    "remaining": null,
    "reason": null
  }
}
```

  </ApiResponse>
  <ApiResponse status={422} description="Batch count exceeds 100">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/access-tokens/eligibility",
  "code": 422,
  "errors": [
    {
      "message": "query: count is too big; maximum allowed is 100",
      "error_code": "VALIDATION_ERROR"
    }
  ]
}
```

  </ApiResponse>
  <ApiResponse status={401} description="Invalid or expired API key">

```json
{
  "ok": false,
  "request_id": "44444444-4444-4444-8444-444444444444",
  "method": "GET",
  "path": "/v2/projects/11111111-1111-4111-8111-111111111111/access-tokens/eligibility",
  "code": 401,
  "error": {
    "message": "Invalid or expired authentication token.",
    "error_code": "UNAUTHORIZED"
  }
}
```

  </ApiResponse>
</ApiResponseTabs>

</ApiSamplePane>
