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

# Test API Key Connection

> Verify your Braintest API key is valid by calling GET /auth/connect/. Returns a simple connect: ok response on success, 401 or 403 on failure.

Use the connection test endpoint to verify that your API key is active and that your integration can reach the Braintest API before you start making production calls. This endpoint requires no request body, path parameters, or query parameters.

## Endpoint

```text theme={"dark"}
GET /auth/connect/
```

## Request

Include your `API-KEY` header in the standard `YOUR_API_KEY` format:

```bash theme={"dark"}
curl -X GET \
  https://braintest.ir/api/v2/auth/connect/ \
  -H "API-KEY: YOUR_API_KEY"
```

## Responses

### Success (200)

If your API key is valid and the request succeeds, the response envelope contains a simple confirmation object:

```json theme={"dark"}
{
  "data": {
    "connect": "ok"
  },
  "successful": true,
  "messages": []
}
```

### Unauthorized (401)

Returned when the `API-KEY` header is missing, malformed, or does not match a valid key pair:

```json theme={"dark"}
{
  "data": null,
  "successful": false,
  "messages": [
    "Invalid API key."
  ]
}
```

### Forbidden (403)

Returned when the API key has been revoked, blocked, or is otherwise not permitted to access the API:

```json theme={"dark"}
{
  "data": null,
  "successful": false,
  "messages": [
    "API key revoked or access denied."
  ]
}
```

## When to use this endpoint

Call `GET /auth/connect/` immediately after you receive your API credentials to confirm that:

1. Your API key value from the organizer panel is correct.
2. Your network can reach the Braintest API.
3. Your key has not been revoked or blocked.

Once you receive `"connect": "ok"`, you can proceed to list records, authenticate profiles, and run tests with confidence.
