Skip to main content
This topic covers the following:

Before you begin

To reset achievements for a test account between test runs, use the Player Data Reset tool (XblPlayerDataReset.exe). To reset a player by XUID, the developer account that you sign in with by using XblDevAccount.exe needs the product-level Tools Access permission.

Unlocking an achievement

After your achievements are configured via Partner Center and published to your development sandbox, your title can unlock them by calling the XblAchievementsUpdateAchievementAsync API. For more information, see the example code in the next section. To unlock an achievement, set percentComplete to 100. If the user is online, the request is immediately sent to the XBOX services Achievements service and triggers the following user experiences.
  • The user receives an Achievement Unlocked notification.
  • The specified achievement appears as unlocked in the user’s achievement list for the title.
  • The unlocked achievement is added to the user’s activity feed.
The user experience is visually the same for achievements that use either event-based Achievements or title-managed Achievements.
If the user is offline, the unlock request is queued locally on the user’s device. When it has reestablished network connectivity, the request is automatically sent to the Achievements service (no action is required from the game to trigger this), and the previous user experiences occur as described.

Updating completion progress for an achievement

To update a user’s progress toward unlocking an achievement, call XblAchievementsUpdateAchievementAsync. Set the percentComplete argument to a whole number between 1-100. For more information, see the following example code. An achievement’s progress can only increase. If percentComplete is set to a number less than the achievement’s last percentComplete value, the update is ignored. For example, if the achievement’s percentComplete had previously been set to 75, sending an update with a value of 25 is ignored. The achievement is still displayed as 75 percent complete. If percentComplete is set to 100, the achievement is unlocked. If percentComplete is set to a number greater than 100, the API behaves as if you set the number to exactly 100.

Updating achievements for the current title

You can update achievements for the current title by calling XblAchievementsUpdateAchievementAsync, as follows. Flat C API
For more information, see the following:

Updating achievements for a different title

You can update achievements for another titleId by using XblAchievementsUpdateAchievementForTitleIdAsync, as follows. Flat C API
For more information, see the following:

Troubleshooting

To group a failure HRESULT into an actionable category, call XblGetErrorCondition. Don’t retry failed updates yourself. If an update fails because of a network or authentication problem, throttling (HTTP 429), a server error (HTTP 5xx), or an unclassified error, XSAPI queues it as an offline event and sends it when the device is back online. In that case, XAsyncGetStatus returns the result of queuing the event, which is normally S_OK. If you retry, the service can receive the update twice. The following results can reach your game: Return to the top of this topic.
Last modified on October 29, 2026