MG+ K2 Single Wallet API Integration Quick Guide
Breadcrumbs

Sessions

Session 请求允许您从 MG+ 请求游戏 session。

作为回应,API 将为您提供一个可用于在指定游戏 session 中启动所需内容的网址。此外,它还允许您获取启动器/锦标赛网址。

POST https://api-demo.k2net.io/api/v1/agents/Test_Agent/players/IMTEST/sessions

如果您在 sessions 请求的请求体中提供了 operatorLoginToken,系统将在最多24小时内重复使用该 token,或者直到使用不同的 operatorLoginToken 发起新的 sessions 请求为止。

当玩家从推广大厅或活动落地页启动其他游戏时,该 token 将被自动重复使用以验证登录。您的集成必须支持 token 重复使用,以确保正确的身份验证。

Request Headers

JSON
Content-Type: “application/x-www-form-urlencoded” Authorization: “Bearer eyJhbNTI1ODcxN”


Request Body

JSON
LangCode: "en-US" Platform: "desktop" ContentCode: "SMG_108heroes"


Response Headers

JSON
Content-Type: “application/json; charset=utf-8”


Response Body

JSON
{"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"}


image-20240401-065415.png
Flowchart depicting the 201 response with a returned URL.