Skip to main content
Work with API

PeerClick provides a REST type API using secure HTTPS methods as the transport layer and JSON as the format

Updated over 8 months ago

PeerClick provides a REST type API using secure HTTPS methods as the transport layer and JSON as the format. Our central gateway API api.peerclick.com is used to process all requests to the corresponding micro-services by including various directory suffixes. Full API documentation is available at http://developers.peerclick.com.

Current limitations and issues

  • If you want to use the PeerClick API, you must remember that there is a limit of 3 API requests per second (1 API request per second for reports).

  • If you want to use the PeerClick API using a passkey, you need to generate it in PeerClick.

  • We reserve the right to limit or terminate API access due to excessive requests or usage. For example, programmatically generating thousands of assets unnecessarily, pushing minute-by-minute data updates, excessively stressing the reporting API to the detriment of other users, etc. Opening up the API does allow for such situations to happen, in some cases unintentionally. No user should use the API to such an extent that it impacts other users, or creates infrastructure load/cost in excess of what is reasonable.

URL Request Anatomy

The request URL may look like this:

https://api.peerclick.com/v1/report?groupBy=campaign&from=2020-01-01

where:

  • https://api.peerclick.com/v1 - URL of the base request. The base request URL is fixed and the same for all requests.

  • /report - directory suffix.

  • ?groupBy=campaign&from=2020-01-01 - additional query parameters depending on your choice.

Directory suffixes example:

  • /report

  • /campaign

  • /offer

Some requests also require adding the component ID after the service directory, those that are clearly indicated in our API documentation through curly braces, for example:

/ campaign / {campaignId}

where {campaignId} needs to be replaced with the campaign ID from your PeerClick account. Additional parameters are then placed in the URL query line (after the question mark ?) to describe the requested data, for example:

?withPages=1


Getting Started with the API

To work with the API you need:

  1. Get the key through the panel in the Settings - Security section.

  2. Get the key token with POST/auth/access/session.

  3. Login with this token to https://developers.peerclick.com/.

1. Create Key

To get an access key:

  • Go to Settings.

  • Go to the Security section.

  • In the Access keys section, click the Add new key button.

Name your key and enter your account password.

Keep your key in a safe place. All tokens created under this key will be tied to it, and will be lost when this key is deleted.

2. Create Key Token


In the Security section, with POST / auth / access / session, create the key token.


Enter the keys generated in the panel in the specified format.

Copy the received key token.


Pay attention that the key token has a lifetime, by default, equal to 86400 seconds, i.e. 1 day. You can change the lifetime of the key token when creating it.

3. Authorize

Log in to https://developers.peerclick.com/ through the Authorize button by entering the value of the generated token in the field.

Did this answer your question?