5
votes

Is it possible to create and load cloud saves in google play services from a webpage (via REST I imagine)? I can only seem to find documentation for saved games for C++/Android code.

2

2 Answers

2
votes

You may check Get Started with Play Games Services for Web.

The REST API for Google Play games services allows you to issue REST calls to set and retrieve game services data from your web game. You can also use the Management API to make REST calls to reset the game services data and perform other administrative functions.

Note: Links to sample code were provided in the page as well. For the games to work properly, you need to set up your own versions in the Google Play Developer Console.

2
votes

All of these methods require authentication and authorisation.

To get a saved game from the REST API call:

https://www.googleapis.com/games/v1/snapshots/{ID of save}

To get a list of saved games:

https://www.googleapis.com/games/v1/players/{me | ID of player}/snapshots

Saving a game is messier, as you have to use the drives API to create the file:

https://www.googleapis.com/upload/drive/v2/files