> 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-v1/bridge-sdk/api/achievements.md).

# Achievements

Use achievements to mark in-game milestones, such as defeating the first boss or collecting 100 coins. Optional. Check `isSupported`, then call `unlock(...)` when the criteria are met.

{% hint style="info" %}
Unlike Leaderboards and Payments, achievement IDs are configured in each platform's developer dashboard, **not** in `playgama-bridge-config.json`. Keep a constants file that maps your in-game milestones to platform achievement IDs.
{% endhint %}

**Support**

Check this before enabling achievement logic or showing achievement UI.

{% tabs %}
{% tab title="Plain JS" %}

```
bridge.achievements.isSupported
```

{% endtab %}

{% tab title="Unity" %}

```csharp
Bridge.achievements.isSupported
```

{% endtab %}

{% tab title="Construct 3" %}

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

{% tab title="GDevelop" %}

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

{% tab title="Godot" %}

```gdscript
Bridge.achievements.is_supported
```

{% endtab %}

{% tab title="GameMaker" %}

```javascript
playgama_bridge_achievements_is_supported()
```

{% endtab %}

{% tab title="Defold" %}

```lua
bridge.achievements.is_supported()
```

{% endtab %}

{% tab title="Cocos Creator" %}

```
bridge.achievements.isSupported
```

{% endtab %}
{% endtabs %}

Check this before calling `getList(...)`. Some platforms can unlock achievements but cannot return the full list.

{% tabs %}
{% tab title="Plain JS" %}

```
bridge.achievements.isGetListSupported
```

{% endtab %}

{% tab title="Unity" %}

```
Bridge.achievements.isGetListSupported
```

{% endtab %}

{% tab title="Construct 3" %}

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

{% tab title="GDevelop" %}

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

{% tab title="Godot" %}

```
Bridge.achievements.is_get_list_supported
```

{% endtab %}

{% tab title="GameMaker" %}

```javascript
playgama_bridge_achievements_is_get_list_supported()
```

{% endtab %}

{% tab title="Defold" %}

```lua
bridge.achievements.is_get_list_supported()
```

{% endtab %}

{% tab title="Cocos Creator" %}

```
bridge.achievements.isGetListSupported
```

{% endtab %}
{% endtabs %}

Check this before showing a native achievement overlay.

{% tabs %}
{% tab title="Plain JS" %}

```
bridge.achievements.isNativePopupSupported
```

{% endtab %}

{% tab title="Unity" %}

```
Bridge.achievements.isNativePopupSupported
```

{% endtab %}

{% tab title="Construct 3" %}

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

{% tab title="GDevelop" %}

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

{% tab title="Godot" %}

```
Bridge.achievements.is_native_popup_supported
```

{% endtab %}

{% tab title="GameMaker" %}

```javascript
playgama_bridge_achievements_is_native_popup_supported()
```

{% endtab %}

{% tab title="Defold" %}

```lua
bridge.achievements.is_native_popup_supported()
```

{% endtab %}

{% tab title="Cocos Creator" %}

```
bridge.achievements.isNativePopupSupported
```

{% endtab %}
{% endtabs %}

<details>

<summary>Platform support · 2 of 28 platforms</summary>

**Supports:** `lagged`, `y8`

**Does not support:** `absolute_games`, `bitquest`, `crazy_games`, `discord`, `dlightek`, `facebook`, `game_distribution`, `gamepush`, `gamesnacks`, `huawei`, `jio_games`, `microsoft_store`, `msn`, `ok`, `playdeck`, `playgama`, `poki`, `portal`, `reddit`, `samsung`, `telegram`, `tiktok`, `vk`, `xiaomi`, `yandex`, `youtube`

</details>

**Unlock achievement**

Unlock an achievement after the player meets its in-game condition. Send each achievement only once.

{% tabs %}
{% tab title="Plain JS" %}

```javascript
let options = { }

switch (bridge.platform.id) {
    case 'y8':
        options = {
            achievement: 'ACHIEVEMENT_NAME',
            achievementkey: 'ACHIEVEMENT_KEY'
        }
        break
    case 'lagged':
        options = {
            achievement: 'ACHIEVEMENT_ID'
        }
        break
}

bridge.achievements.unlock(options)
    .then((result) => {
        // success
    })
    .catch(error => {
        // error
    })
```

{% endtab %}

{% tab title="Unity" %}

```csharp
private void Start()
{
    var options = new Dictionary<string, object>();

    switch (Bridge.platform.id)
    {
        case "y8":
            options.Add("achievement", "ACHIEVEMENT_NAME");
            options.Add("achievementkey", "ACHIEVEMENT_KEY");
            break;
        case "lagged":
            options.Add("achievement", "ACHIEVEMENT_ID");
            break;
    }

    Bridge.achievements.Unlock(options, OnAchievementsUnlockCompleted);
}

private void OnAchievementsUnlockCompleted(bool success, Dictionary<string, string> result)
{
    Debug.Log(success);
}
```

{% endtab %}

{% tab title="Construct 3" %}

<figure><img src="/files/6TX7NiJi5jkDaW1rcacf" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformId","comparison":0,"second-value":"\"y8\""}}],"actions":[{"id":"add-action-parameter","objectClass":"PlaygamaBridge","parameters":{"key":"\"achievementkey\"","value":"\"YOUR_ACHIEVEMENT_KEY\""}},{"id":"add-action-parameter","objectClass":"PlaygamaBridge","parameters":{"key":"\"achievement\"","value":"\"YOUR_ACHIEVEMENT_NAME\""}}]},{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformId","comparison":0,"second-value":"\"lagged\""}}],"actions":[{"id":"add-action-parameter","objectClass":"PlaygamaBridge","parameters":{"key":"\"achievement\"","value":"\"YOUR_ACHIEVEMENT_ID\""}}]},{"eventType":"block","conditions":[],"actions":[{"id":"achievements-unlock","objectClass":"PlaygamaBridge"}]}]},{"eventType":"block","conditions":[{"id":"on-achievements-unlock-completed","objectClass":"PlaygamaBridge"}],"actions":[{"type":"comment","text":"success"}]}]}
```

</details>
{% endtab %}

{% tab title="GDevelop" %}

<figure><img src="/files/VrA4PTz7DWCRKCZCRGAN" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"y8\""]}],"actions":[{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievementkey\"","\"YOUR_ACHIEVEMENT_KEY\"",""]},{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievement\"","\"YOUR_ACHIEVEMENT_NAME\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"lagged\""]}],"actions":[{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievement\"","\"YOUR_ACHIEVEMENT_ID\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsUnlock"},"parameters":["",""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsUnlockCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"success\"","\"info\"",""]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>
{% endtab %}

{% tab title="Godot" %}
{% tabs %}
{% tab title="Godot 3.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong>func _ready():
</strong><strong>    var options
</strong>
    match Bridge.platform.id:
        "y8":
            options = {
                "achievementkey": "YOUR_ACHIEVEMENT_KEY",
                "achievement": "YOUR_ACHIEVEMENT_NAME"
            }
        "lagged":
            options = {
                "achievement": "YOUR_ACHIEVEMENT_ID",
            }

    Bridge.achievements.unlock(options, funcref(self, "_on_unlock_completed"))

func _on_unlock_completed(success):
    print(success)
</code></pre>

{% endtab %}

{% tab title="Godot 4.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong>func _ready():
</strong><strong>    var options
</strong>
    match Bridge.platform.id:
        "y8":
            options = {
                "achievementkey": "YOUR_ACHIEVEMENT_KEY",
                "achievement": "YOUR_ACHIEVEMENT_NAME"
            }
        "lagged":
            options = {
                "achievement": "YOUR_ACHIEVEMENT_ID",
            }

    Bridge.achievements.unlock(options, Callable(self, "_on_unlock_completed"))

func _on_unlock_completed(success):
    print(success)
</code></pre>

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="GameMaker" %}

```javascript
var options
switch playgama_bridge_platform_id() {
    case "y8":
        options = {
            "achievement": "ACHIEVEMENT_NAME",
            "achievementkey": "ACHIEVEMENT_KEY"
        }
        break
    case "lagged":
        options = {
            "achievement": "ACHIEVEMENT_ID"
        }
        break
}

playgama_bridge_achievements_unlock(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_unlock_callback" {
    if async_load[? "success"] {
        // your logic here
    }
}
```

{% endtab %}

{% tab title="Defold" %}

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = {
        y8 = {
            achievement = "ACHIEVEMENT_NAME",
            achievementkey = "ACHIEVEMENT_KEY"
        },
        lagged = {
            achievement = "ACHIEVEMENT_ID"
        }
    }

    bridge.achievements.unlock(options, function ()
        -- success
    end, function ()
        -- error
    end)
end
```

{% endtab %}

{% tab title="Cocos Creator" %}

```javascript
let options = { }

switch (bridge.platform.id) {
    case 'y8':
        options = {
            achievement: 'ACHIEVEMENT_NAME',
            achievementkey: 'ACHIEVEMENT_KEY'
        }
        break
    case 'lagged':
        options = {
            achievement: 'ACHIEVEMENT_ID'
        }
        break
}

bridge.achievements.unlock(options)
    .then((result) => {
        // success
    })
    .catch(error => {
        // error
    })
```

{% endtab %}
{% endtabs %}

<details>

<summary>Platform support · 2 of 28 platforms</summary>

**Supports:** `lagged`, `y8`

**Does not support:** `absolute_games`, `bitquest`, `crazy_games`, `discord`, `dlightek`, `facebook`, `game_distribution`, `gamepush`, `gamesnacks`, `huawei`, `jio_games`, `microsoft_store`, `msn`, `ok`, `playdeck`, `playgama`, `poki`, `portal`, `reddit`, `samsung`, `telegram`, `tiktok`, `vk`, `xiaomi`, `yandex`, `youtube`

</details>

**Get List**

Returns the achievement list when the platform supports it. The returned fields are platform-specific.

{% tabs %}
{% tab title="Plain JS" %}

```javascript
let options = { }
bridge.achievements.getList(options)
    .then(list => {
        // success
        switch (bridge.platform.id) {
            case 'y8':
                list.forEach(list => {
                    console.log('achievementid: ' + list.achievementid)
                    console.log('achievement: ' + list.achievement)
                    console.log('description: ' + list.description)
                    console.log('achievementkey: ' + list.achievementkey)
                    console.log('icon: ' + list.icon)
                    console.log('playerid: ' + list.playerid)
                    console.log('playername: ' + list.playername)
                })
                break
        }
    })
    .catch(error => {
        // error
    })
```

{% endtab %}

{% tab title="Unity" %}

```csharp
private void Start()
{
    Bridge.achievements.GetList(OnGetListCompleted);
}

private void OnGetListCompleted(bool success, List<Dictionary<string, string>> list)
{
    Debug.Log($"OnGetListCompleted, success: {success}, items:");
                
    if (success)
    {
        switch (Bridge.platform.id)
        {
             case "y8":
                 foreach (var item in list)
                 {
                     Debug.Log("achievementid:" + item["achievementid"]);
                     Debug.Log("achievement:" + item["achievement"]);
                     Debug.Log("achievementkey:" + item["achievementkey"]);
                     Debug.Log("description:" + item["description"]);
                     Debug.Log("icon:" + item["icon"]);
                     Debug.Log("difficulty:" + item["difficulty"]);
                     Debug.Log("secret:" + item["secret"]);
                     Debug.Log("awarded:" + item["awarded"]);
                     Debug.Log("game:" + item["game"]);
                     Debug.Log("link:" + item["link"]);
                     Debug.Log("playerid:" + item["playerid"]);
                     Debug.Log("playername:" + item["playername"]);
                     Debug.Log("lastupdated:" + item["lastupdated"]);
                     Debug.Log("date:" + item["date"]);
                     Debug.Log("rdate:" + item["rdate"]);
                 }
                 break;
        }
    }
}
```

{% endtab %}

{% tab title="Construct 3" %}

<figure><img src="/files/SoZp9w7uW8WoLUUTljIY" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"achievements-get-list","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-achievements-get-list-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.AchievementsCount","comparison":4,"second-value":"0"}}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"for","objectClass":"System","parameters":{"name":"\"items\"","start-index":"0","end-index":"PlaygamaBridge.AchievementsCount - 1"}}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"PlaygamaBridge.PlatformId","comparison":0,"second-value":"\"y8\""}}],"actions":[{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Achievement ID: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"achievementid\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Achievement Name: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"achievement\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Achievement Key: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"achievementkey\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Description: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"description\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Icon: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"icon\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Difficulty: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"difficulty\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Secret: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"secret\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Awarded: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"awarded\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Game: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"game\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Link: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"link\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Player ID: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"playerid\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Player Name: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"playername\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Last Updated: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"lastupdated\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Date: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"date\")"}},{"id":"log","objectClass":"Browser","parameters":{"type":"log","message":"\"Relative Date: \" & PlaygamaBridge.AchievementPropertyValue(loopindex(\"items\"), \"rdate\")"}}]}]}]}]}]}
```

</details>
{% endtab %}

{% tab title="GDevelop" %}

<figure><img src="/files/ZVpugLvkzppbgwpTfboI" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsGetList"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsGetListCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"PlaygamaBridge::AchievementsCount()","conditions":[],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"y8\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement ID:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievementid\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement Name:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievement\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement Key:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievementkey\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Description:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"description\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Icon:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"icon\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Difficulty:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"difficulty\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Awarded:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"awarded\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Secret:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"secret\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Game:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"game\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Link:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"link\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Player ID:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"playerid\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Player Name:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"playername\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Last Updated:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"last updated\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Date:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"date\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Relative Date:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"rdate\")","\"info\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","+","1"]}]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>
{% endtab %}

{% tab title="Godot" %}
{% tabs %}
{% tab title="Godot 3.x" %}

```gdscript
func _on_get_list_button_pressed():
    var options
    
    Bridge.achievements.get_list(options, funcref(self, "_on_get_list_completed"))

func _on_get_list_completed(success, list):
    print(success)
    
    match Bridge.platform.id:
        "y8":
            for item in list:
                print("achievementid:" + str(item.achievementid))
                print("achievement:" + str(item.achievement))
                print("achievementkey:" + str(item.achievementkey))
                print("description:" + str(item.description))
                print("icon:" + str(item.icon))
                print("difficulty:" + str(item.difficulty))
                print("secret:" + str(item.secret))
                print("awarded:" + str(item.awarded))
                print("game:" + str(item.game))
                print("link:" + str(item.link))
                print("playerid:" + str(item.playerid))
                print("playername:" + str(item.playername))
                print("lastupdated:" + str(item.lastupdated))
                print("date:" + str(item.date))
                print("rdate:" + str(item.rdate))
```

{% endtab %}

{% tab title="Godot 4.x" %}

```gdscript
func _on_get_list_button_pressed():
    var options
    
    Bridge.achievements.get_list(options, Callable(self, "_on_get_list_completed"))

func _on_get_list_completed(success, list):
    print(success)
    
    match Bridge.platform.id:
        "y8":
            for item in list:
                print("achievementid:" + str(item.achievementid))
                print("achievement:" + str(item.achievement))
                print("achievementkey:" + str(item.achievementkey))
                print("description:" + str(item.description))
                print("icon:" + str(item.icon))
                print("difficulty:" + str(item.difficulty))
                print("secret:" + str(item.secret))
                print("awarded:" + str(item.awarded))
                print("game:" + str(item.game))
                print("link:" + str(item.link))
                print("playerid:" + str(item.playerid))
                print("playername:" + str(item.playername))
                print("lastupdated:" + str(item.lastupdated))
                print("date:" + str(item.date))
                print("rdate:" + str(item.rdate))
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="GameMaker" %}

```javascript
playgama_bridge_achievements_get_list()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_get_list_callback" {
    if async_load[? "success"] {
        var achievements_list = json_parse(async_load[? "data"])
    }
}
```

{% endtab %}

{% tab title="Defold" %}

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = { }
    bridge.achievements.get_list(options, function (_, data)
        -- success
    end, function ()
        -- error
    end)
end
```

{% endtab %}

{% tab title="Cocos Creator" %}

```javascript
let options = { }

bridge.achievements.getList(options)
    .then(list => {
        // success
        switch (bridge.platform.id) {
            case 'y8':
                list.forEach(list => {
                    console.log('achievementid: ' + list.achievementid)
                    console.log('achievement: ' + list.achievement)
                    console.log('description: ' + list.description)
                    console.log('achievementkey: ' + list.achievementkey)
                    console.log('icon: ' + list.icon)
                    console.log('playerid: ' + list.playerid)
                    console.log('playername: ' + list.playername)
                })
                break
        }
    })
    .catch(error => {
        // error
    })
```

{% endtab %}
{% endtabs %}

<details>

<summary>Platform support · 1 of 28 platforms</summary>

**Supports:** `y8`

**Does not support:** `absolute_games`, `bitquest`, `crazy_games`, `discord`, `dlightek`, `facebook`, `game_distribution`, `gamepush`, `gamesnacks`, `huawei`, `jio_games`, `lagged`, `microsoft_store`, `msn`, `ok`, `playdeck`, `playgama`, `poki`, `portal`, `reddit`, `samsung`, `telegram`, `tiktok`, `vk`, `xiaomi`, `yandex`, `youtube`

</details>

**Show Native Popup**

Some platforms can show a built-in achievement overlay. Use it instead of building custom UI when available.

{% tabs %}
{% tab title="Plain JS" %}

```javascript
let options = { }
bridge.achievements.showNativePopup(options)
    .then(() => {
        // success
    })
    .catch(error => {
        // error
    })
```

{% endtab %}

{% tab title="Unity" %}

```csharp
private void Start()
{
    Bridge.achievements.ShowNativePopup(options, (success) =>
    {
        Debug.Log($"OnShowNativePopupCompleted, success: {success}");
    });
}
```

{% endtab %}

{% tab title="Construct 3" %}

<figure><img src="/files/Va6771cyL7pCnjVnraaz" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"achievements-show-native-popup","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-achievements-show-native-popup-completed","objectClass":"PlaygamaBridge"}],"actions":[{"type":"comment","text":"success"}]}]}
```

</details>
{% endtab %}

{% tab title="GDevelop" %}

<figure><img src="/files/RInAY7L065NhhphhfsNa" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsShowNativePopup"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsShowNativePopupCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"success\"","\"info\"",""]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>
{% endtab %}

{% tab title="Godot" %}
{% tabs %}
{% tab title="Godot 3.x" %}

```gdscript
func _on_show_native_popup_button_pressed():
    var options
    
    Bridge.achievements.show_native_popup(options, funcref(self, "_on_show_native_popup_completed"))

func _on_show_native_popup_completed(success):
    print(success)
```

{% endtab %}

{% tab title="Godot 4.x" %}

```gdscript
func _on_show_native_popup_button_pressed():
    var options
    
    Bridge.achievements.show_native_popup(options, Callable(self, "_on_show_native_popup_completed"))

func _on_show_native_popup_completed(success):
    print(success)
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="GameMaker" %}

```javascript
playgama_bridge_achievements_show_native_popup()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_achievements_show_native_popup_callback" {
    if async_load[? "success"] {
        // your logic here
    }
}
```

{% endtab %}

{% tab title="Defold" %}

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = { }
    bridge.achievements.show_native_popup(options, function ()
        -- success
    end, function ()
        -- error
    end)
end
```

{% endtab %}

{% tab title="Cocos Creator" %}

```javascript
let options = { }

bridge.achievements.showNativePopup(options)
    .then(() => {
        // success
    })
    .catch(error => {
        // error
    })
```

{% endtab %}
{% endtabs %}

<details>

<summary>Platform support · 1 of 28 platforms</summary>

**Supports:** `y8`

**Does not support:** `absolute_games`, `bitquest`, `crazy_games`, `discord`, `dlightek`, `facebook`, `game_distribution`, `gamepush`, `gamesnacks`, `huawei`, `jio_games`, `lagged`, `microsoft_store`, `msn`, `ok`, `playdeck`, `playgama`, `poki`, `portal`, `reddit`, `samsung`, `telegram`, `tiktok`, `vk`, `xiaomi`, `yandex`, `youtube`

</details>
