PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

IsLegal

This function determines if a given badge is associated with the current game. It returns true if the badge is associated with the current game.

Badges can only be awarded from a place that is part of the game associated with the badge. This means, for example, a developer cannot award a badge associated with another developer’s game.

Even if this returns true, a badge may still not be award-able. For example, it may be disabled. For more information on the criteria for awarding badges see BadgeService/AwardBadge|AwardBadge.

Parameters

Name Type Default Description

The badge ID of the badge.

Returns

Return Type Summary

True if the badge is associated with the current game.


Code Samples


Awarding a Badge

This code sample includes a simple function for awarding a badge.