Register an achievement in the Developer Portal before your game unlocks it. An id that is not
registered is refused with
404 NOT_FOUND, and nothing is recorded.Types
Calling
Unlock on an incremental achievement, or Increment on a one-shot one, fails with
400 INVALID_ARGUMENT.
Unlock
newlyUnlocked is false.
Increment
amount must be greater than zero. The server keeps the counter and unlocks the achievement when
it reaches the target, so your game never tracks the threshold itself. Points are awarded once,
when the target is crossed.
List
Responses
All three methods return anHttpResponse:
The
data of each response:
targetValue and currentValue are null for one-shot achievements.
From a webhook event
Sending the custom eventachievement_unlocked with an achievementId parameter unlocks a one-shot
achievement the same way — see Webhooks.
Test in the Editor
The Editor Simulator applies the same rules in Play Mode — includingNOT_FOUND for an id you have not registered — using the definitions you download from the portal.