Integrate game via API
Generate a URL to redirect users to a unique game instance
Use the API to generate a unique game instance. Send users to this URL to play your game and collect data.
Generate a unique game URL
To generate a secure game instance URL for your user to play a game, use the /api/authentication/generatePlayUrl
endpoint and specify the app_id
, secret
, game_id
, the player_id
, num_items
, and callback_url
.
Returns a URL you can use to send a user to play a game in 2bttns.
ID of the app you've created in 2bttns
Secret of the app you've created in 2bttns
ID of the game you want to play in 2bttns
ID of the player you want to play in 2bttns. If the player doesn't already exist, it will be created.
Find game_id
in Console
game_id
in ConsoleWe can get the game_id
from our Console by navigating to Games:

Example
Last updated
Was this helpful?