> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenframed.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test an auth profile against a URL

` POST /v1/auth-profiles/{id}/test `

Test an auth profile against a URL

## Servers

- ` https://screenframed.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` bearerAuth `: ` http `

  - HTTP scheme: ` bearer `

  - ScreenFramed API key, such as `sf_live_...`.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

  - pattern: ` "^ap_[A-Z0-9]{26}$" `

## Request body (required)

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` url `

  - ` url `: type ` string `; format ` uri `

## Responses

### ` 200 ` — Test result

Content type: ` application/json `

- ` value `: type ` object `

  - ` ok `: type ` boolean `

  - ` cookie_count `: type ` integer `

### ` 404 ` — Error response

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` code `, ` message `

    - ` code `: type ` string `

    - ` message `: type ` string `

    - ` details `: type ` object `

    - ` retry_after `: type ` integer `

## Request examples

### cURL

```curl
curl -X POST 'https://screenframed.com/v1/auth-profiles/string/test' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com"
}'
```

### JavaScript

```javascript
const response = await fetch('https://screenframed.com/v1/auth-profiles/string/test', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://screenframed.com/v1/auth-profiles/string/test', headers=headers, json={
  "url": "https://example.com"
})
print(response.json())
```