# Read effective public access

Source: https://docs.vlayers.ai/reference/public-access/get-effective-public-access

`GET /v1/public-access/effective` · scope `public_access:read`

Resolves what a session on a website key gets right now: whether it is open, why not when it is not, each cap, whether the bot check applies, and which level (platform, plan, workspace, agent or key) decided each value. Levels only tighten: a cap is the lowest of them and any "off" wins.

Requires an API key with the `public_access:read` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `keyId` | query | string | yes | The publishable website key to resolve. Example: `"key_9b3d42"` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/public-access/effective?keyId=$WEBSITE_KEY_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { open } = await voicelayer.publicAccess.effective({ keyId: '<website-key-id>' });
console.log(open);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.publicAccess.effective(key_id="<website-key-id>")
print(result.open)
```

## Response `200`

```json
{
  "keyId": "key_9b3d42",
  "open": true,
  "offReason": null,
  "sessionsPerDay": 50,
  "concurrentSessions": 2,
  "perIpPerHour": 3,
  "maxCallMinutes": 3,
  "botCheck": "on",
  "challengeKeySource": {
    "kind": "connection",
    "connectionId": "0192f5c3-7a8b-7cad-9e2f-3a4b5c6d7e89"
  },
  "sources": {
    "enabled": "binding",
    "sessionsPerDay": "operator",
    "concurrentSessions": "binding",
    "perIpPerHour": "operator",
    "maxCallMinutes": "operator",
    "botCheck": "operator",
    "challengeKeySource": "workspace"
  },
  "botCheckOptional": false,
  "ceilings": {
    "sessionsPerDay": 50,
    "concurrentSessions": 3,
    "perIpPerHour": 3,
    "maxCallMinutes": 3
  },
  "botOffCeilings": {
    "sessionsPerDay": 10,
    "concurrentSessions": 1,
    "perIpPerHour": 1
  }
}
```
