19

I'm testing my game using Google's new Games Services, and I'd like to reset my account's achievements for testing.

I've found that you can reset achievements using google's APIs (https://developers.google.com/games/services/management/api/#Achievements) and I'm using the OAuth 2.0 playground to send the POST request, but it's not working :(

Specifically, I'm a sending POST request for "https://www.googleapis.com/games/v1management/achievements/reset" as detailed in that link.

AND, when I go to code.google com and check my Services, all the Play services are "ON".

Here is the output. How can I reset my achievements for testing? Am I even close? Apparently my "access is not configured" How do I do that? What was the point of the whole first 2 steps of the OAuth2.0 playground if not to grant my access?

HTTP/1.1 403 Forbidden
Content-length: 205
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
X-google-cache-control: remote-fetch
-content-encoding: gzip
Server: GSE
Reason: Forbidden
Via: HTTP/1.1 GWA
Cache-control: private, max-age=0
Date: Sun, 19 May 2013 04:11:38 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
Expires: Sun, 19 May 2013 04:11:38 GMT
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured"
   }
  ],
  "code": 403,
  "message": "Access Not Configured"
 }
}
MPelletier
  • 16,256
  • 15
  • 86
  • 137
user2391981
  • 191
  • 1
  • 1
  • 5

7 Answers7

13

This is how I got it to work:

  1. Open the Google Play Developer Console, go to Linked Apps under Game Services and click Link another App -> Web, for the URL use https://developers.google.com/oauthplayground and complete the setup of this linked app. Make sure the same URL is listed as an authorized redirect URI.

  2. Go to https://developers.google.com/oauthplayground and click on the gears icon in top right, select Use your own OAuth credentials, and copy the Client ID and Client secret for your Web app from https://code.google.com/apis/console.

  3. For the Scope in OAuth Playground's Step 1 use https://www.googleapis.com/auth/games, which is found under Google Play Game Services API.

  4. Do a POST to https://www.googleapis.com/games/v1management/achievements/reset or https://www.googleapis.com/games/v1management/achievements/resetAllForAllPlayers or whatever, leave all other options as is.

  5. Profit :)

Note:

At first I was doing step 2. after step 3. and it gave me the 403

m1h4
  • 1,139
  • 2
  • 13
  • 22
3

You must set your Client ID & Client Secret in Google Playground.

Click to right side of top "Setting Button". Set your credential information to there.

Finally click to first tab from left side of page. Select scopes and Authorize!

  • 1
    I'm trying to do what you commented. I created a new client ID for web application because I noticed it was the only option that would give me client ID + Client Secret. When I try to reset achievements I get an error saying that there's no liked app for this clientID. My application is an android application and I have it configured OK. But this just gives me a clientID not a Client Secret. Could you comment if this is the correct way to do it?. Thanks in advance. – Notbad Sep 24 '13 at 21:54
2

I couldn't get the POST request to work either, but you can reset your achievements by deleting and re-adding your tester account.

Grantland Chew
  • 2,620
  • 26
  • 26
  • 2
    This seems to only reset non-incremental achievements in my experience. It's sad that there's no simple "remove all tester data"-button in the play console :-(! – Nick May 24 '13 at 21:00
  • 2
    @Nick it actually gets reset for me, but it's not immediate like the non-incremental achievements. It either gets reset with time, or once you fire off an increment call after you delete and re-create your tester account. – Grantland Chew May 24 '13 at 22:33
  • yes, I just noticed this as well - sorry for the confusion :)! – Nick May 24 '13 at 23:09
  • @GrantlandChew I tried removing and re-adding tester accounts but it is not resetting any accomplishment data at all (incremental or otherwise, immediate or later). Does this work for published accomplishments or only unpublished? Ours are published but we still need some way to reset for testing. – mwk Jul 12 '13 at 23:44
  • 1
    @Nick There's now a Reset button for draft Achievements and Leaderboards in the bottom of each entry. – Neerkoli Dec 09 '15 at 12:50
  • @WeirdElfB0y Maybe you should put your comment as answer, so it will be more visible. This is the easiest way to reset an achievement. Thanks! – luben Jul 03 '16 at 16:38
  • 1
    @middlehut Okay I'm gonna do that. :) – Neerkoli Jul 04 '16 at 11:21
2

There's now a Reset button for draft Achievements and Leaderboards in the bottom of each entry.

Neerkoli
  • 2,423
  • 3
  • 16
  • 21
1

Check out this tool which google has provided in their GitHub Repo

https://github.com/playgameservices/management-tools/tree/master/demo-management-tools

Using the tool you can manage Google Play Games Management API to manage and test Google Play Games Features which includes resetting of the Achievements and Leaderboard.

user1169079
  • 3,053
  • 5
  • 42
  • 71
1

As WeirdElfBOy said, there is a reset button inside every achievement in your developer console. But the following requirements must be fulfilled to get the reset work:

  1. it has to be a release signed apk which is installed for testing.
  2. The app must be in alpha or beta test phase, using the same version of app that you have installed for testing (not rellay sure about that)
  3. The Play Games settings for your app shouldn´t be published. You can only reset achievements for test users with an unpublished game. With game I mean the play games settings, not the app itself.

After pressing the reset, it needs long time to reset, in my test it needed about 1 hour, but maybe could be longer or shorter.

So for reset an achievement, you don´t need to use ManagementAPI.

But there is a little issue, I think it´s on Googles site and I reported it to Google. The reset doesn´t work on incremental achievements.

Opiatefuchs
  • 9,800
  • 2
  • 36
  • 49
1

Open the Google Play Games app on your phone, go to settings, and then select "Delete Play Games data", scroll down, and delete data from your game.

lbenedetto
  • 2,022
  • 1
  • 21
  • 39