I'm trying to implement leaderboards in my Android game using Google Play Games Services. I think I understand how to submit a score and access a leaderboard from a client which is signed in to Play Games, however I would also like to be able to access the leaderboard from my server. This way, I can show the leaderboard to users which are not yet signed in to Play Games or even show it on Discord with my bot. But I can't figure out how to do that.
Whenever I try to find information on the Internet about server-side access to Play Games, I only find how to get a one-time usage token from a client to then call Play Games from the server on behalf of the user (as I understand it).
But that's not what I want to do! I need to be able to access the leaderboard from my server as an admin (or as myself or as a service account or anything like that), not on behalf of a user. And I want to be able to do that at any time, not only when a client sends an access token...
Is this possible?
Thank you in advance for any help on this matter!
I created a new credential for a web server and then, using my Oauth consent screen, I managed to give myself a refresh token for my own Google account. This way I can get access tokens whenever I want from my server and access the Play Games REST API with these access tokens on behalf of my account.
Here is how I did it step by step :
The whole procedure is explained here : https://developers.google.com/identity/protocols/oauth2/web-server