> For the complete documentation index, see [llms.txt](https://wiki.playgama.com/playgama/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.playgama.com/playgama/bridge-sdk/config.md).

# Config

{% hint style="info" %}
You are reading the documentation for Bridge SDK **v2**. If you need the obsolete v1 documentation, see [Documentation (v1)](https://wiki.playgama.com/playgama/bridge-sdk-v1).
{% endhint %}

`playgama-bridge-config.json` is the SDK configuration file. It stores platform identifiers, ad placements, the product catalog, leaderboards, and other SDK settings. One file is shared by every platform: top-level values apply everywhere, and the `platforms` block overrides them per platform.

{% hint style="info" %}
Use the [config editor](https://playgama.github.io/bridge-config-editor/) to create and update the file — it is the most convenient way to keep the structure valid.
{% endhint %}

## File location

{% tabs %}
{% tab title="Plain JS" %}
Place `playgama-bridge-config.json` next to your `index.html` — Bridge loads it from `./playgama-bridge-config.json`, relative to the page.
{% endtab %}

{% tab title="Unity" %}

```
WebGLTemplates/Bridge/playgama-bridge-config.json
```

{% endtab %}

{% tab title="Construct 3" %}
Import the file into the `Files` folder of your project.
{% endtab %}

{% tab title="GDevelop" %}
There is no separate file — the configuration is stored inside the extension. Open the `Playgama Bridge` extension in the editor, select the `onFirstSceneLoaded` function, and set the configuration there.
{% endtab %}

{% tab title="Godot" %}

```
addons/playgama_bridge/template/playgama-bridge-config.json
```

{% endtab %}

{% tab title="GameMaker" %}

```
datafiles/playgama-bridge-config.json
```

<figure><img src="/files/BCvDCDBY6zjyZeLHX1tr" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Defold" %}
Import the file into `res/web` and add the `/res` folder to `Bundle Resources`.

<figure><img src="/files/Lme3F6t6sHuYnU0pPQEL" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Cocos Creator" %}

```
extensions/playgama-bridge/playgama-bridge-config.json
```

{% hint style="warning" %}
`playgama-bridge-config.json` is copied automatically from the extension folder to the `web-mobile` build folder after each build.
{% endhint %}
{% endtab %}

{% tab title="Scratch" %}
Add `playgama-bridge-config.json` to your project files.
{% endtab %}
{% endtabs %}

## Example

```json
{
    "platforms": {
        "game_distribution": {
            "gameId": "game_id"
        }
    },
    "advertisement": {
        "minimumDelayBetweenInterstitial": 60,
        "interstitial": {
            "placements": [
                {
                    "id": "level_completed"
                }
            ]
        }
    },
    "payments": [
        {
            "id": "coins_pack",
            "playgama": {
                "amount": 10
            }
        }
    ],
    "leaderboards": [
        {
            "id": "main"
        }
    ],
    "achievements": [
        {
            "id": "first_win"
        }
    ]
}
```

## Platform settings

The `platforms` block holds platform identifiers and per-platform overrides, keyed by platform id. When the game runs on a platform, the values from `platforms.<id>` are deep-merged over the top-level values — so any setting, including module sections, can be overridden for one platform only:

```json
{
    "platforms": {
        "crazy_games": {
            "useUserToken": true // add the player's JWT token to the player extra data
        },
        "discord": {
            "appId": "your_app_id"
        },
        "dlightek": {
            "appKey": "your_app_key",
            "adSenseId": "your_adsense_id",
            "adChannel": "your_ad_channel",
            "testMode": false
        },
        "facebook": {
            "subscribeForNotificationsOnStart": true // subscribe the player to bot notifications after initialization
        },
        "game_distribution": {
            "gameId": "your_game_id" // required
        },
        "gamepush": {
            "projectId": "your_project_id",
            "publicToken": "your_public_token"
        },
        "huawei": {
            "appId": "your_app_id"
        },
        "jio_games": {
            "adTestMode": false // load the platform SDK in the test-ad environment
        },
        "lagged": {
            "devId": "your_dev_id",
            "publisherId": "your_publisher_id"
        },
        "microsoft_store": {
            "gameId": "your_game_id", // required
            "playgamaAdsId": "your_playgama_ads_id" // required
        },
        "msn": {
            "gameId": "your_game_id" // used for cloud saves
        },
        "telegram": {
            "adsgramBlockId": "your_adsgram_block_id"
        },
        "tiktok": {
            "clientKey": "your_client_key"
        },
        "xiaomi": {
            "adSenseId": "your_adsense_id",
            "testMode": false
        },
        "yandex": {
            "useSignedData": false // request cryptographically signed player data
        }
    }
}
```
