Get player details from Google Play Games Service storage

血红的双手。 提交于 2019-12-11 11:52:38

问题


I have an android game configured with Google Play Games API. API works perfectly and user can sign in, use leaderboard, earn achievements, etc. Now i want to access Player details if possible like email, name, age who are already signed in the game. I am doing this right now from the app itself, what if i want to access this data remotely?

Also is this possible to get all connected player details even without having their individually Player ID? For example, Getting a list of all the users who are signed in through web?


回答1:


From here: https://developers.google.com/games/services/web/api/players/get

You need to send an HTTP GET request with playerId as

GET https://www.googleapis.com/games/v1/players/playerId

This request requires authorization with the following scope

https://www.googleapis.com/auth/games

If successful, this method returns a Players resource in the response body.

Here's the JSON template for a Player resource:

https://developers.google.com/games/services/web/api/players#resource



来源:https://stackoverflow.com/questions/35379231/get-player-details-from-google-play-games-service-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!