---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/hi/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/ko/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/ru/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/tr/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/vi/sdk/sdk-other-games.md
  - https://yandex.com/dev/games/doc/zh/sdk/sdk-other-games.md
  - href: en/sdk/sdk-other-games.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/en/llms.txt

# Links to other games

<!-- source: en/_includes/script-common.md -->
<!-- source: en/_includes/script/index-js.md -->

<!-- endsource: en/_includes/script/index-js.md -->

<!-- source: en/_includes/script/requirements-js.md -->

<!-- endsource: en/_includes/script/requirements-js.md -->

<!-- source: en/_includes/script/image-modal-js.md -->

<!-- endsource: en/_includes/script/image-modal-js.md -->
<!-- endsource: en/_includes/script-common.md -->

SDK Yandex Games provides the ability to automatically obtain correct links to your other games (both specific ones and the entire list) to reference them in the game.

To ensure that the game is available on the current platform and domain ([item 8.4.1](https://yandex.com/dev/games/doc/en/concepts/requirements.md#8-4-1)), use the methods `GamesAPI.getAllGames()` and `GamesAPI.getGameByID()`.

## ysdk.features.GamesAPI.getAllGames() {#get-all-games}

Use the method when you need to retrieve information about all your games that are available on the current platform and domain.

### Example {#get-all-games-ex}

```javascript showLineNumbers
ysdk.features.GamesAPI.getAllGames().then(({games, developerURL}) => {
    games.forEach((game) => {
        // Game processing logic.
    })
}).catch(err => {
    // Error in retrieving game data.
})
```

### Response Format {#get-all-games-response}

```javascript showLineNumbers
{
    [games](*key_games): IGame[];
    [developerURL](*key_developerURL): string;
}
```

#|
|| **Parameter** | **Type** | **Description** ||
|| `games` | [IGame[]](#igame) | Array of objects with game information. ||
|| `developerURL` | `string` | Link to the developer's page. ||
|#

## ysdk.features.GamesAPI.getGameByID() {#get-game-by-id}

Use the method when you need to retrieve data about a specific game and its availability on the current platform and domain.

Accept parameter:

<div class="table-25 table-2c25">

#|
|| **Parameter** | **Type** | **Description** ||
|| `appID` | `number` | Game ID from the developer console. ||
|#

</div>

### Example {#get-by-id-ex}

```javascript showLineNumbers
ysdk.features.GamesAPI.getGameByID(100000).then(({isAvailable, game}) => {
    if (isAvailable) {
        // If the game is available, handle the game.
    } else {
        // Logic if the game is unavailable, the game object is undefined.
    }
}).catch(err => {
    // Error retrieving game data.
})
```

### Response Format {#get-by-id-response}

```javascript showLineNumbers
{
    [game](*key_game)?: IGame;
    [isAvailable](*key_isAvailable): boolean;
}
```

#|
|| **Parameter** | **Type** | **Description** ||
|| `game` | [IGame](#igame) | An object containing information about the game. ||
|| `isAvailable` | `boolean` | Indicates if the game is available:
* `true` — the game is available;
* `false` — the game is not available, the `game` object is undefined (`undefined`). ||
|#

## IGame Interface {#igame}

```typescript showLineNumbers
interface IGame {
    [appID](*key_appId): string;
    [title](*key_title): string;
    [url](*key_url): string;
    [coverURL](*key_coverURL): string;
    [iconURL](*key_iconURL): string;
}
```

#|
|| **Parameter** | **Type** | **Description** ||
|| `appID` | `string` | The game's identifier, as set in the developer console. ||
|| `title` | `string` | The name of the game. ||
|| `url` | `string` | The link to the game. ||
|| `coverURL` | `string` | The link to the game's cover image. ||
|| `iconURL` | `string` | The link to the game's icon. ||
|#

---

<!-- source: en/_includes/sdk-support.md -->
{% note info %}

Our support team can help publish finished games on Yandex Games. If you have any questions about development or testing, ask them in the [Discord channel](https://discord.com/invite/wU4p3whr4T){.external}.

{% endnote %}

If you are facing an issue or have a question regarding the use of Yandex Games SDK, please contact support:

<!-- source: en/_includes/button-chat.md -->
<a href="https://yandex.com/chat/#/user/a4fa5c06-75db-9b38-6eea-b1673785f7d5">
  <span class="button">Write to chat</span>
</a>
<!-- endsource: en/_includes/button-chat.md -->
<!-- endsource: en/_includes/sdk-support.md -->

[*key_games]: Array of objects with game information.

[*key_developerURL]: Link to the developer's page.

[*key_game]: An object containing information about the game.

[*key_isAvailable]: Indicates if the game is available:
* `true` — the game is available;
* `false` — the game is not available, the `game` object is undefined (`undefined`).

[*key_appId]: The game's identifier, as set in the developer console.

[*key_title]: The name of the game.

[*key_url]: The link to the game.

[*key_coverURL]: The link to the game's cover image.

[*key_iconURL]: The link to the game's icon.