Developer Console

Leaderboards and Tournaments Code Samples

Amazon provides the following code samples for your convenience.

By downloading the Leaderboards and Tournaments code samples, you agree to our Program Materials License Agreement.

Samples may include third-party software that is copyrighted by other parties and is subject to separate license terms. Information on that software and the applicable copyright notices and license terms are included in the sample files.

You can download these samples and give them a test drive. To provide feedback or ask questions, you can participate in our support forum or contact us.

Cryptography Samples

The initial version of the cryptography code samples is now deprecated. This version is applicable only to games that were registered before Aug 15, 2018. Download the Cryptography code samples (deprecated).

For new games that you register after Aug 14, 2018, the Leaderboards and Tournaments advanced security authentication requires you to generate longer keys (2048 bits) for your players and use OAEP (a padding mechanism) while encrypting and decrypting. These changes are reflected in the following new version of the cryptography code samples:

Cryptography code samples V2

Android

You can download our Android sample quiz game that includes integration with Leaderboards and Tournaments.

Details of the quiz game integration with Leaderboards and Tournaments is covered in our Android Tutorial.

GameMaker

Use the Amazon Leaderboards and Tournaments extension and Demo project for GameMaker to access the Amazon Leaderboards and Tournaments API from GameMaker Studio.

Unity

The Leaderboards and Tournaments Unity Starter Kit demonstrates how to easily call the GameOn REST APIs from Unity.

The Leaderboards and Tournaments Sample Unity Game that demonstrates how to integrate the various features of Leaderboards and Tournaments into a real-life game.

Alexa Skills

The Skills GameOn SDK for Node.js provides easy access to the Amazon Leaderboards and Tournaments API, along with higher-level methods, utilities, and examples that simplify the integration of Leaderboards and Tournaments features, like leaderboards, with Alexa skills.

You can download a full skill code sample that showcases how to integrate daily tournaments, along with many other features from the SDK.