AI-generated Key Takeaways
-
This guide helps developers integrate GameSnacks games into their game centers using the GameSnacks Partner API.
-
Developers should have an AdSense account and be familiar with AdSense and the GameSnacks Partner console before starting.
-
To use the API, developers need to allowlist their Google Cloud project and email via a provided form to avoid permission errors.
-
Developers must generate an API key in the Google Cloud console and use it in HTTP calls to retrieve and integrate games.
-
Account ID and Game Center ID are needed for API calls and can be found in the GameSnacks Partner console when creating a game center.
This guide is intended for developers who want to use the GameSnacks Partner API to get games for their game centers. This guide assumes that you're familiar with web programming concepts and web data formats.
Prerequisites
Before you can start, there are a few things you need to do:
You need an AdSense account
Sign up for AdSense or sign in to your AdSense account.Familiarize yourself with AdSense
If you're not familiar with AdSense concepts, read the introductory information on AdSense and experiment with the AdSense interface before starting to code.Familiarize yourself with the GameSnacks Partner console
Learn more about GameSnacks and the GameSnacks Partner console.
Quick start tutorial
Follow these steps to register your application:
- Sign in to the Google Cloud console.
- Select or create a project.
- Allowlist your Google Cloud project and your email as described below.
- In the API Library, find and select "GameSnacks Partner API".
- Click APIs & Services > Credentials.
- Click CREATE CREDENTIALS > API key.
Use the API key to make an HTTP call. Note, if you skip this step, you will get a
403 PERMISSION_DENIED
error when you try to make the API call.HTTP call example:
https://gamesnackspartner.googleapis.com/v1/accounts/${ACCOUNT_ID}/gamecenters/${GAME_CENTER_ID}/games?key=${API_KEY}
Where:
ACCOUNT_ID
is your GameSnacks account ID.GAME_CENTER_ID
is your game center ID.API_KEY
is the API key you generated at step 5.
To retrieve the
ACCOUNT_ID
andGAME_CENTER_ID
see create a game center.
Allowlist your Google Cloud project
To use the GameSnacks Partner API you must allowlist your Google Cloud project and your email. To do this, complete the GameSnacks interest form.