The sessions request allows you to request a game session from MG+.
In response, the API will provide you with a URL that can be used to launch the desired content within the specified game session. It’ll also allow you to get a Launchpad/Tournament URL.
POST https://api-demo.k2net.io/api/v1/agents/Test_Agent/players/IMTEST/sessions
If you provide an operatorLoginToken in the request body of the sessions request, the system will reuse this token for up to 24 hours, or until a new session request is made with a different operatorLoginToken.
When the player launches additional games from a promotions lobby or a campaign landing page, this token will be automatically reused to validate logins. Your integration must support token reuse to ensure proper authentication.
Request Headers
Content-Type: “application/x-www-form-urlencoded”
Authorization: “Bearer eyJhbNTI1ODcxN”
Request Body
langCode: "en-US"
platform: "desktop"
contentCode: "SMG_108heroes"
Response Headers
Content-Type: “application/json; charset=utf-8”
Response Body
{
"url":"https://speed.qfdelivery.com/Platform/Default.aspx?applicationid=163&productId=10001&gameid=108heroesDesktop&brand=MG01&loginType=VanguardSessionToken&languageCode=en-us&externalToken=eyJhbGciOiJSUzUxM&host=desktop&clienttypeid=70&launchHash=uAkGdN6"
}