Google Play Games

This how-to walks you through authenticating and setting up Google Play Games for your game.

Prerequisites

Configure Google Play Games

First, navigate to the Platform Settings for Google Play Gamesarrow-up-right in the LootLocker Web Console.

Client ID

In the Google Play Developer Console, navigate to Play Games Services -> Setup and management -> Configuration and copy the Client ID and paste it into the Client ID field in the LootLocker Web Console.

Client Secret

Go to the Google Cloud Consolearrow-up-right, navigate to the OAuth2-part of your app and generate a new secret key or create a new Oauth client with a Web Client configuration. Download the Client Secret and store it in a safe place, copy the Client Secret and paste it into the Client Secret field in the LootLocker Web Console.

App ID

In the Google Play Developer Console, navigate to Play Games Services -> Setup and management -> Configuration and copy the Project ID and paste it into the App ID field in the LootLocker Web Console.

After all credentials have been added, click Save in the LootLocker Web Console. Google Play Games is now fully configured in the Web Console and ready to be used in your game.

Web Console Setup

Now, verify that all information that is in their respective input fields.

Authenticating with Google Play Games in your game

LootLocker supports Google Play Games v2arrow-up-right, if your game is running v1 of Google Play Games, you must migratearrow-up-right to v2.

Starting a session

When signing in with Google Play Games, you need to add the OPEN_ID-scope when requesting the token.

Make sure that you have the Google Play Games v2 SDK properly installed and setup before adding any code.

This code serves as an example, make sure to add any error handling that your game might require.

Conclusion

In this how-to we have set up and enabled Google Play Games. Your game is now fully setup to integrate any of our other available features.

Last updated

Was this helpful?