Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking a Chrome Packaged App to Google Play Games

I'm developing a game as a Chrome Packaged App and I want to use Google Play Games for the leaderboards, but it's turning into a little bit of a process.

I'm having trouble getting the Chrome Packaged App to authenticate with Google Play Games.

I've got most of it nailed down:

  • I've created a game in the Google Play Developer Console
  • I pretty quickly got everything working by uploading the game to my server and going to Linked Apps and creating a Web App entry. Leaderboards, achievements and everything works great.
  • I followed the All-The-Stars-JS example to get everything into the package so gapi.auth.authorize() can work within the packaged app... but using the call returns "OAuth2 request failed: Service responded with error: 'bad client id: NON_NATIVE'"
  • This makes sense-- the OAUTH2 Client ID from the Linked App manager is expecting a web app. There isn't a way to create a Linked App for the Chrome Packaged App so I created one using the Google API Console as the example suggested. This gets me authenticated!
  • Now, when I try to pull a list of leaderboards I get a response: "There is no linked app associated with this client ID."

Right, that makes sense because I created Client ID manually in the Google API Console and there's probably no "link" to Google Play Games... but I can't link it to the Google Play Games service manually, and there's no way to just link a Chrome Packaged App from the Google Play Developer Console. Am I missing something?? I've been chasing this issue for months!

Thanks in advance to anyone who can help!

like image 233
Brian Avatar asked Nov 10 '22 06:11

Brian


1 Answers

@Brian I think you are doing everything correctly. Currently there is not a way (that I'm aware of) to link a Chrome packaged app to Play Game Services. The reason you are able to get authenticated but not see Leaderboards is that you created the Client ID through Google Developer Console, which does not create the necessary entries in the Games back-end.

I will report your experience to the Play Game Services team, maybe this is something we could support in the future.

like image 161
Sam Stern Avatar answered Dec 21 '22 22:12

Sam Stern