Skip to content

AdvGame API - documentation

Base URL: https://advgame.com/api/v1/

Results are always returned in JSON format and UTF-8 encoding.

Documentation includes examples on Python and library requests.

Authentication

Some methods require authentication.

Use token for authentication, which you can get on the profile page API. Token should be included in HTTP-Header Authorization. Header's example:

Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

Request example

requests.get('https://advgame.com/api/v1/me/balance/', headers={
    'Authorization': 'Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'
})

In further examples this header would be omitted even though it is required.

Pages

Some methods use pagination. In that case, response looks like:

{
    "_meta": {
        "count": 34,
        "limit": 100,
        "offset": 0,
        "next": null,
        "previous": null
    },
    "results": [
        ...
    ]
}

You can setup response result with limit&offset GET-parameters.

Request example

requests.get('https://advgame.com/api/v1/advcampaigns/', params={
    'limit': 10,
    'offset': 20,
})