curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "MOBILE",
"date": "2023-11-07T05:31:56Z"
}'
curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "DESKTOP",
"date": "2023-11-07T05:31:56Z"
}'
{
"deepLink": "https://my-awesome-game/2298/bv45d674?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": false
}
{
"deepLink": "https://my-awesome-game/auth?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": true
}
{
"error": "Invalid signature"
}
{
"error": "Unauthorized"
}
{
"error": "Parameters not correct"
}
Initiate Game Auth Callback
Warning: This API endpoint is only relevant for the Game Redirect Login method.
Note: This is a callback API. Appcharge calls this endpoint on your server when specific events occur. Notifies your system to initiate an authentication session in your game.
Appcharge calls this endpoint when a player attempts to log in via Game Redirect Login. Your server responds with either the data needed to redirect the player to your game for authentication, or an error.
curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "MOBILE",
"date": "2023-11-07T05:31:56Z"
}'
curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "DESKTOP",
"date": "2023-11-07T05:31:56Z"
}'
{
"deepLink": "https://my-awesome-game/2298/bv45d674?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": false
}
{
"deepLink": "https://my-awesome-game/auth?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": true
}
{
"error": "Invalid signature"
}
{
"error": "Unauthorized"
}
{
"error": "Parameters not correct"
}
curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "MOBILE",
"date": "2023-11-07T05:31:56Z"
}'
curl -X POST \
'https://{YOUR_INITIATE_GAME_AUTH_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"device": "DESKTOP",
"date": "2023-11-07T05:31:56Z"
}'
{
"deepLink": "https://my-awesome-game/2298/bv45d674?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": false
}
{
"deepLink": "https://my-awesome-game/auth?key=549bc5151667f6216629efe46vf7bacd2812d82298",
"accessToken": "9ac8883227afa33412197b",
"desktopAutoRedirect": true
}
{
"error": "Invalid signature"
}
{
"error": "Unauthorized"
}
{
"error": "Parameters not correct"
}
Body
Response
OK
Deeplink for redirecting the player to your game for authentication.
"https://my-awesome-game/2298/bv45d674?key=549bc5151667f6216629efe46vf7bacd2812d82298"
Player access token.
"9ac8883227afa33412197b"
Whether players logging into the web store on desktop are redirected to the deepLink URL instead of being shown a QR code.
When false or omitted, these players see a QR code of the deeplink and must scan it with their phone to open the game.
true
Was this page helpful?
