Create an Access Code for Player

Supported Formats

json

Errors

Code Description
400 Bad Request: body has wrong syntax or unable to handle request
401 Unauthorized: auth_token omitted or authentication failed
403 Forbidden: This action cannot be performed
404 Not Found: The requested resource could not be found
406 Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Examples

REQUEST
Content-Type: application/json
{
  "max_uses": 1
}

RESPONSE
201 (Created)
{
  "value": "mI2y0ez1",
  "expiry_date": 0,
  "max_uses": 1,
  "creation_method": "access_request",
  "id": 11,
  "created_at": 1431026485,
  "updated_at": 1431026485,
  "player_id": 39
}

Params

Param name Description
auth_token
optional

API token needed to authorize requests
This can appear as an attribute in the body of the request or the query parameters on the URL

Validations:

  • Must be a String

max_uses
optional

Set a maximum use limit for the access code
Default: 1

Validations:

  • Parameter has to be Integer.

value
optional

The access code value

Validations:

  • Must be a String

expiry_date
optional

Set expiry date for the access code

Validations:

  • Parameter has to be DateTime.