# Get WordPress.com OAuth connect URL

Fetches a WordPress.com OAuth connect URL.

```http
GET https://api.pozy.ai/v1/connect/wordpress
```

- Area: Accounts & connections / Connect
- Auth: API key plus X-Connect-Token header

## Query parameters

- `profileId` (string, required)
- `redirect_url` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/connect/wordpress?profileId=6a0b6573846efc28aaa9a3ff" \
  -H "X-Connect-Token: $CONNECT_TOKEN"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/connect/wordpress?profileId=6a0b6573846efc28aaa9a3ff", {
  headers: { "X-Connect-Token": process.env.CONNECT_TOKEN! },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/connect/wordpress",
    headers={"X-Connect-Token": os.environ["CONNECT_TOKEN"]},
    params={
        "profileId": "6a0b6573846efc28aaa9a3ff",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `authUrl`, string (URL), required
- `state`, string, required

```json
{
  "authUrl": "https://pozy.ai/media/example-1.jpg",
  "state": "string"
}
```
