# Integrate via the All Games API

The **All Games API** lets you access a list of games and associated details (description, screenshots etc.) so that you can directly launch games from your app / site instead of sending users to the Gamezop Game Centre.

### Making the request

#### API endpoint

<mark style="color:green;">`GET`</mark> `https://api.gamezop.com/v3/games`

#### Headers

<table><thead><tr><th width="190.1171875">Name</th><th>Description</th></tr></thead><tbody><tr><td>Authorization: Bearer<mark style="color:red;">*</mark></td><td>You must ask your Gamezop Account Manager to get your Bearer token created for you. You can then find the Bearer token for this API under <em>Settings &#x26; Admin > API Tokens</em> within the Gamezop Business Dashboard. </td></tr></tbody></table>

#### Query parameters

<table><thead><tr><th width="190.328125">Name</th><th>Description</th></tr></thead><tbody><tr><td>lang</td><td>ISO 639-1 language code. A full list of valid language codes is available in the IANA Language Subtag Registry (filter for <code>Type: language</code>)</td></tr></tbody></table>

***

### Understanding the response

#### HTTP response codes

The API provides a JSON response with a `data` object. This, in turn, contains an array of JSON objects, each representing data on 1 game.

{% tabs %}
{% tab title="200: OK" %}
**Expected response body:**

This sample response contains 1 single game object. Your API response will contain 1 game object for each game enabled for your Property ID.

```json
{
  "data": [
    {
      "code": "Ey5Wzu1MZ9l",
      "url": "https://www.gamezop.com/g/Ey5Wzu1MZ9l",
      "name": "Hextris",
      "description": "Rotate the Hexagon to match colours, prevent the blocks from stacking on incorrect counterparts.",
      "screen_orientation": "portrait",
      "has_integrated_ads": true,
      "category": {
        "id": 1,
        "name": "Arcade"
      },
      "images": {
        "cover": "https://static.gamezop.com/Ey5Wzu1MZ9l/cover.jpg",
        "brick": "https://static.gamezop.com/Ey5Wzu1MZ9l/brick.png",
        "thumb": "https://static.gamezop.com/Ey5Wzu1MZ9l/thumb.png",
        "wall": "https://static.gamezop.com/Ey5Wzu1MZ9l/wall.png",
        "square": "https://static.gamezop.com/Ey5Wzu1MZ9l/square.png",
        "screenshots": [
          "https://static.gamezop.com/Ey5Wzu1MZ9l/game-1.png",
          "https://static.gamezop.com/Ey5Wzu1MZ9l/game-2.png",
          "https://static.gamezop.com/Ey5Wzu1MZ9l/game-3.png"
        ]
      }
    }
  ],
  "success": true
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}
Occurs when the Bearer Token is incorrect / not provided / belongs to an archived Property.
{% endtab %}
{% endtabs %}

#### Response body

The table below explains each of the fields the API returns within a game object.

<table><thead><tr><th width="189.81640625">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>code</code></td><td>A unique alphanumeric identifier for the game</td></tr><tr><td><code>url</code></td><td>The URL to the game that you can embed in your app or website</td></tr><tr><td><code>name</code></td><td>A name object for the game, capturing the game name.<br><br>If you request data for any specific language, this field will contain the name of the game in that language. If we do not have the game name in the requested language, the English name of the game will be returned.</td></tr><tr><td><code>description</code></td><td>A short description object of the game that can be displayed to the end-user.<br><br>If you request data for any specific language, this field will contain the description of the game in that language. If we do not have the game description in the requested language, the English description of the game will be returned.</td></tr><tr><td><code>screen_orientation</code></td><td><p>Possible values</p><ul><li><code>portrait</code></li><li><code>landscape</code></li><li><code>responsive</code></li></ul></td></tr><tr><td><code>has_integrated_ads</code></td><td><p>If <code>true</code>, it means that this game has integrated ads which cannot be removed. Integrated ads are different from the ads that come before or during gameplay. </p><p></p><p>Integrated ads are those ads which users opt-in to watch. For instance, users may have an option to get an extra life by watching an ad. If the value for <code>has_integrated_ads</code> is <code>false</code>, it means that the game does not give users any option to watch an ad.<br><br>If you are working with us on a model where you have ads disabled, you should avoid using games where this value is <code>true</code>. </p></td></tr><tr><td><code>category</code></td><td><p>The category to which the game belongs. <code>category</code> is a JSON object, containing 2 values: <code>id</code> and <code>name</code>. </p><p></p><p>A game will always belong to <strong>only one</strong> of these categories: </p><ul><li>Arcade | <code>id</code>: 1</li><li>Action | <code>id</code>: 2</li><li>Sports &#x26; Racing | <code>id</code>: 3</li><li>Strategy | <code>id</code>: 4</li><li>Puzzle &#x26; Logic | <code>id</code>: 5</li><li>Adventure | <code>id</code>: 7<br></li></ul><p>If you request data for any specific language, <code>category.name</code> will contain the game's category in that language. If we do not have the category name in the requested language, the English name for the game category will be returned.</p></td></tr><tr><td><code>images</code></td><td><p>An assets object for the game. This contains several assets that can be used as promotional banners:</p><ul><li><code>cover</code>: URL to a 600x492 pixels image asset</li><li><code>brick</code>: URL to a 310x150 pixels image asset</li><li><code>wall</code>: URL to a 1024x500 pixels image asset</li><li><code>thumb</code>: URL to a <a data-footnote-ref href="#user-content-fn-1">512x512 pixels image asset</a></li><li><code>square</code>: URL to a <a data-footnote-ref href="#user-content-fn-2">512x512 pixels image asset</a></li><li><code>screenshots</code>: An array of 3 URLs with screenshots from the game</li></ul><p>To find more assets for any particular game, enter the <code>code</code> from the API for that game in our <a href="https://dashboard.gamezop.com/creatives-library/">Creatives Library's </a>search bar.</p></td></tr></tbody></table>

***

{% hint style="success" %}
If you wish to open Gamezop's games within an iframe in your website, ask your Gamezop Account Manager to whitelist your Property ID for iframe usage. By default, Gamezop games do not work within iframes.
{% endhint %}

If you're looking for deeper integration guides, such as those for leaderboards, or 1v1 multiplayer matches, check our advanced guides linked below.

{% content-ref url="/pages/-MdX-l44aVpPUnjHA8m-" %}
[Advanced guides](/publishers/gamezop/advanced.md)
{% endcontent-ref %}

[^1]: This has rounded corners, and a Gamezop logo in the bottom right of the image.

[^2]: This does not have rounded corners, and does not carry the Gamezop logo.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.gamezop.com/publishers/gamezop/types-of-integration/all-games-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
