MG+ K2 Common Wallet API Integration Quick Guide
Breadcrumbs

Create a Player

Next, proceed by creating a new player. This step allows for the establishment of a new player profile within the MG+ system.

  1. Find your API URL. This can be found in MG+ Backoffice, or given to you by your Account Manager.

    image-20240327-075225.png
  2. Create a request.

    1. Replace the URL with your API URL and DemoAgent with your Agent Code.

      1. In the request example, this is the api-demo.k2net.io and the DemoAgent portions of the endpoint.

    2. Set the Authorization token to be your STS Token.

      1. In the request example, this is the (STS Token) portion of the request header.

    3. Replace the playerId with your player.

      1. In the request example, this is the testPlayer portion of the request body.

Request Example

POST https://api-demo.k2net.io/api/v1/agents/DemoAgent/players


Request Headers

Content-Type: application/x-www-form-urlencoded
Authorization: (STS Token)


Request Body

{
  playerId: "testPlayer"
}


  1. You should receive a 201 response.

Response Example

201 Response Body Example

{
  "playerId": "testPlayer",
  "createdDateUTC": "2021-12-30T08:34:32.809",
  "isLocked": false,
  "uri": "https://api-demo.k2net.io/api/v1/agents/DemoAgent/Players/testPlayer"
}


Checklist

  • Did you use the correct API URL from your Account Manager or MG+ Backoffice?
  • Did you put /api/v1/ after your API URL?
  • Did you use the POST method?
  • Did you put the STS Token in the Authorization request header?
  • Did you put the playerId in the request body?
  • Has the STS Token expired?