Recently I had to work with Leaderboards and scores for our new game QuickAZ. So while I was developing and testing the game, my scores were registered to Leaderboards, which was a good thing :D.
RESET THE SCORE BEFORE PUBLISHING
But, before publishing the game, I wanted to reset my score. In this phase is pretty easy to reset the score. You have to open your Google Play Developer Console – Go to Game Services – Select Leaderboards – Select Your Leaderboard –Ā click the button labeled “Delete” at the bottom of the page.
RESET THE SCORE AFTER PUBLISHING
Well, in this phase, the reset is not so straightforward. After I published my game, I startedĀ fixingĀ a few bugs and I did something that alteredĀ my score, so I needed to delete itĀ from Leaderboards. I spent a lot of time searching on the internet how toĀ do that and in the end I found this solution that I hope will help you guys to save some time.
1. Tools needed
- Google Play Developer Console (site where you publish your apps)
- Google Developer Console (do not confuse with the first one)
- OAuth 2.0 Playground
2. Link your app
You have to have your app linked to OAuth 2.0 Playground. In order to do that you just have to make sure that you have your email in the TESTĀ list in the Game Services from Developer Console and after that, follow the steps from this tutorial.
3. Reset score requestĀ
Now that you have your app linked, and learned from the previous tutorial how to use playground, you just have to getĀ your Leaderboard id from Ā Google Play Developer ConsoleĀ and add the following request in theĀ OAuth 2.0 PlaygroundĀ page:
POST https://www.googleapis.com/games/v1management/leaderboards/leaderboardId/scores/reset
E.g.
POST https://www.googleapis.com/games/v1management/leaderboards/Cfk65GCgfj8/scores/reset
The above example will reset allĀ scores for the leaderboard with the given ID for the currently authenticated player. For more types of reset requests visit https://developers.google.com/games/services/management/api/scores
After you send the request you canĀ open your leaderboards from your app and you will notice that your score has disappeared.
I hope this tutorial will help you!