Making Requests
Authenticated requests carry your access token in the Authorization header. A quick way to confirm a token works is the account-info endpoint, which returns the authenticated account.
Always send the Accept header. Add
Accept: application/json to every request. Without it, error responses can fall back to an HTML page instead of a JSON body, which is much harder to parse. cURL
curl https://loops.video/api/v1/account/info/self \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"JavaScript
const res = await fetch(
'https://loops.video/api/v1/account/info/self',
{ headers: { Authorization: 'Bearer ' + accessToken } }
)
const account = await res.json()Response codes
The API uses standard HTTP status codes. Errors return a JSON body with an error field describing what went wrong.
| Status | Meaning |
|---|---|
| 200 | Success. |
| 401 | Missing or invalid access token. |
| 403 | Authenticated, but not allowed to perform this action. |
| 404 | The requested resource does not exist. |
| 422 | Validation failed — check the error body for details. |
| 429 | Rate limit exceeded. |