Authentication
Mostly all API endpoints are protected with HTTP Authorization Token, to access them, token should be provided in HTTP header:
curl -H "Authorization: Token YOUR-TOKEN-HERE" https://api.convertiser.com/
You can manage your tokens in the API tokens section. Advertisers manage theirs in the advertiser API tokens section.
Your API tokens carry many privileges, so be sure to keep them secret, do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
API requests without API token will also fail with HTTP403 Forbidden error.
How to generate API token
To generate Authorization Token use 3 simple steps:
- Login to Convertiser panel with your login and password
- Navigate to "Account Settings" -> "API Tokens", or for an advertiser account "Account Settings" -> "API Tokens"
- Press "Create Token" button
How to use the request console
Every endpoint page in this documentation has a request console. It sends real requests to the API with your token, so a POST, PATCH, PUT or DELETE sent from it changes your live data. For exploring, use a token with only the read scope. When you press "Create Token", tick read and leave write unticked. Product search and reports read data through POST, so they answer a read token with 403 Forbidden and need write as well.
Paste your API token into the console's "Auth" section as the bare key, without the Token prefix. The console adds the prefix itself.