Each section starts with the error as you see it. If your error is not listed or the fix does not help, use the [contact form](/contact) and include the request, the full response and its Request ID if there is one.

## "Invalid owner in token" [#invalid-owner-in-token]

**Cause:** you called an endpoint that acts on an OLX user's account (for example adding an advert or checking the account balance) with a token from the `client_credentials` grant. That token belongs to your app, not to a user.

**Fix:** get a token with the `authorization_code` grant for the user whose account you want to use. See [Grant type: authorization_code](/api-reference#description/grant-type-authorization-code) in the API reference.

## "The grant type is unauthorized for this client_id" [#grant-type-unauthorized]

**Cause:** your app is not allowed to use the `grant_type` you sent, or the value is misspelled.

**Fix:** check that `grant_type` is exactly one of `authorization_code`, `client_credentials` or `refresh_token`, and that you send the `client_id` of the right app. If the value is correct and the error persists, [contact us](/contact) with your `client_id`.

## Refresh token expired [#refresh-token-expired]

**Cause:** a refresh token is valid for 30 days (2592000 seconds), and there is no refresh token that never expires. A refresh can also return a new refresh token, and integrations that keep using the first one eventually send an expired token.

**Fix:** after every refresh, store the `refresh_token` from the response and use it next time. If the token has already expired, the user must connect their account again through the `authorization_code` flow. See [Grant type: refresh_token](/api-reference#description/grant-type-refresh-token-when-access-token-is-expired) in the API reference.

## "Missing required header" [#missing-required-header]

**Cause:** the request has no `Version` header.

**Fix:** send `Version: 2.0` with every Partner API request:

<SiteCode
    lang="bash"
    code={`curl "https://{SITE_HOST}/api/partner/adverts" \\
  -H "Authorization: Bearer ACCESS_TOKEN" \\
  -H "Version: 2.0"`}
/>

## 400 Bad Request on a GET request [#content-type-header]

**Cause:** the GET request has a `Content-Type: application/json` header. GET requests have no body, and the API rejects them with this header.

**Fix:** send `Content-Type: application/json` only on requests with a JSON body (POST, PUT). Remove it from GET requests.

## 403 "The request could not be satisfied" [#rate-limits]

You get an HTML page instead of JSON:

```text
403 ERROR
The request could not be satisfied.
Request blocked. We can't connect to the server for this app or website at this time.
...
Generated by cloudfront (CloudFront)
Request ID: sY4_bCTYW2pwfH5dGXYjdY1843RY6uKYMLSsxy2dDJS9_JbTqrITGw==
```

**Cause:** your IP address sent more than 4500 requests within 5 minutes. Requests from that IP are then blocked for 30 minutes.

**Fix:**

- Wait 30 minutes; the block lifts on its own.
- Keep your request rate below 4500 requests per 5 minutes per IP. To sync statuses without re-fetching every advert, use the [change feed](/docs/status-synchronization).
- If you are still blocked after 30 minutes, or you are sure you stayed under the limit, [contact us](/contact) with the IP address you send requests from and the Request ID from the error page.
