Brand Hosting
Last updated
Last updated
The brand must transmit the userid to the server where the HTML5 game files are hosted via the Webhook server. Once the game ends, the values of userid and GameResult are returned to the Webhook server. Through the userid, the brand can identify who the game player is and receive the GameResult information of the respective player via the Webhook server. The setup of such a Webhook server must be carried out by the brand itself.
You can use the userid and Webhook to send game-related data to the brand's Webhook server after the game on Brand hosting.
When a mini-game is launched on the brand’s server, the user ID (userid) is retrieved from the brand’s Webhook server via a GET request and passed to the mini-game execution URL.
The mini-game runs within the web page environment of the brand’s server.
After the game ends, the game score is displayed on the results screen.
The brand’s Webhook server receives game-related data through the Webhook.
Based on the received data, the brand operates its own leaderboard and rewards programme.
The brand must set up a Webhook program on their server to receive game result data.
You need to enter the Webhook server’s address in the Installation section of Studio.
Download the game file with the completed setup as a ZIP file.
Copy the ZIP file to the brand server and complete the necessary setup.
The brand applies the received data to their own leaderboard or reward program based on the data transmitted via Webhook.
When retrieving the mini-game URL value from the Webview, the 'userid' parameter and its value must be included using the GET method.
Parameter
userid *
Unique ID generated from the customer's system
Alphanumeric (case-sensitive) + up to 20 digits
T4g4fLTaorjames
Example, Original campaign URL address https://brand.server.com/ The brand's system must call this URL and send the "userid".
https://brand.server.com/?php=userid=T4g4fLTa
After the game, the result value and various data are received by the brand’s server through the Webhook created by the brand.
userid *
User's unique ID
T4g4fLTa or james
tx_id *
Unique ID for each game played
234234
time *
Datetime when the game player attempted to play
2023-04-10 06:39:23
score *
Score obtained by the game player
3500
playtime*
Duration of play by the game player (in seconds)
20
* Indicates a required value.
Return Code
The brand server must return the result code to our studio system.
S
When successful
F
When failing If you want to state the reason for failure, you can add text after the "F" code. Example) "F: Score is missing."
PHP example
To obtain parameter values when the returned data is in JSON format, you must first parse the data.