v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Authentication

Initiate Game Auth

<Warning> This API endpoint is only relevant for the Game Redirect Login method. </Warning> <Note> This is a callback API. Appcharge calls this endpoint on your server when specific events occur. </Note> Notifies your system to initiate an authentication session in your game. <br /> <br /> 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.

post/{YOUR_INITIATE_GAME_AUTH_ENDPOINT}

Headers

x-publisher-tokenstring

Publisher token.

signaturestring

The signed payload.

Request body

device'DESKTOP' | 'APPCHARGE'

Device the player used to log in.

  • DESKTOP: PCs and laptops.
  • APPCHARGE: Mobile.
datestring date-time

Date in ISO 8601 format.

Example request

{
  "device": "DESKTOP",
  "date": "2023-11-07T05:31:56Z"
}

Response

OK

deepLinkstring required

Deeplink for redirecting the player to your game for authentication.

accessTokenstring required

Player access token.

desktopAutoRedirectboolean

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.

Example response

{
  "deepLink": "https://my-awesome-game/2298/bv45d674?key=549bc5151667f6216629efe46vf7bacd2812d82298",
  "accessToken": "9ac8883227afa33412197b",
  "desktopAutoRedirect": true
}