Skip to content

Trophies Module

Lucas E. da Silva edited this page Apr 13, 2026 · 2 revisions

🏆 Trophies Module

The Trophies service manages achievements for your game. You can use these functions to award, remove, or check the status of specific trophies for the authenticated user.


🛠️ Functions

trophies_info(trophy_id: int = 0) -> Variant

Returns information about trophies.

  • trophy_id: (Optional) If set to 0, returns all trophies for the game. If a specific ID is provided, it returns information only for that trophy.

trophy_add(trophy_id: int) -> Variant

Unlocks a trophy for the authenticated user.

  • trophy_id: The unique ID of the trophy you want to award.

trophy_remove(trophy_id: int) -> Variant

Removes an already achieved trophy from the user's account.

  • trophy_id: The unique ID of the trophy to remove.

trophy_achieved(achieved: bool) -> Variant

Returns a list of trophies based on whether the user has achieved them or not.

  • achieved: Set to true to get only trophies the user has earned, or false to get trophies they haven't earned yet.

💡 Example Usage

Awarding a Trophy

await GameJoltAPI.trophy_add(123456)

Clone this wiki locally