# Facebook video status

> Check whether a Facebook Page video has finished publishing.

Canonical: <https://www.tryadeli.com/docs/api/posts/get-facebook-video-status>

`GET https://app.tryadeli.com/api/v1/posts/facebook/status`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

Polls a Reel or feed video that [Publish to Facebook](https://www.tryadeli.com/docs/api/posts/publish-facebook)
accepted with `202`. Photos publish synchronously and have nothing to poll.

**Query parameters**

| Name        | Type     | Required | Description                                                                       |
| ----------- | -------- | -------- | --------------------------------------------------------------------------------- |
| `accountId` | `uuid`   | Yes      |                                                                                   |
| `publishId` | `string` | Yes      | From the publish response.                                                        |
| `profileId` | `uuid`   |          | Optional, because accountId names its profile. If you pass both, they must agree. |

`status` is `PROCESSING`, `READY`, or `ERROR`. A `READY` response carries
`permalink`; an `ERROR` carries `failureReason`, which is Meta's own account of
what was wrong with the video — usually its length or aspect ratio.

## Request examples

**cURL**

```bash
curl --fail-with-body "https://app.tryadeli.com/api/v1/posts/facebook/status?accountId=00000000-0000-0000-0000-000000000000&publishId=1234567890" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/posts/facebook/status?accountId=00000000-0000-0000-0000-000000000000&publishId=1234567890", {
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
  },
});
console.log(await response.json());
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://app.tryadeli.com/api/v1/posts/facebook/status",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    params={
        "accountId": "00000000-0000-0000-0000-000000000000",
        "publishId": "1234567890",
    },
)
print(response.json())
```

## Responses

### 200

```json
{
  "platform": "facebook",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "profileId": "00000000-0000-4000-8000-000000000001",
  "publishId": "1234567890",
  "status": "READY",
  "phase": "complete",
  "permalink": "https://www.facebook.com/reel/1234567890",
  "failureReason": null
}
```

### 422

```json
{
  "error": {
    "code": "connection_expired",
    "message": "Facebook connection requires reconnecting"
  }
}
```
