POST v1/tokens/participant/{id}
Creates a token for a user so that they can play a game. If the participant does not already exist in the system, it will be created before the token is created.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
Unique ID for the participant receiving a new token. |
string |
Required |
Body Parameters
An object representing the Token.
CreateToken| Name | Description | Type | Additional information |
|---|---|---|---|
| TokenSourceId | string |
None. |
|
| ParticipantSourceId | string |
None. |
|
| GameSourceId | string |
None. |
|
| Reason | string |
None. |
Request Formats
application/json, text/json
Sample:
{
"TokenSourceId": "sample string 1",
"ParticipantSourceId": "sample string 2",
"GameSourceId": "sample string 3",
"Reason": "sample string 4"
}
text/html
Sample:
{"TokenSourceId":"sample string 1","ParticipantSourceId":"sample string 2","GameSourceId":"sample string 3","Reason":"sample string 4"}
application/xml, text/xml
Sample:
<CreateToken xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Games.Api.Contracts.v1.Models"> <GameSourceId>sample string 3</GameSourceId> <ParticipantSourceId>sample string 2</ParticipantSourceId> <Reason>sample string 4</Reason> <TokenSourceId>sample string 1</TokenSourceId> </CreateToken>
Response Information
Resource Description
A response containing the new Token's unique id, or validation errors if the Token could not be created.
TokenPostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | string |
None. |
Response Codes
- 201 Created: Token successfully created.
- 400 BadRequest: Data validation failed, see the response body for more information.
- 401 Unauthorized:
- 500 InternalServerError:
Response Formats
application/json, text/json
Sample:
{
"Id": "sample string 1"
}
text/html
Sample:
{"Id":"sample string 1"}
application/xml, text/xml
Sample:
<TokenPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Games.Api.Contracts.v1.Responses"> <Id>sample string 1</Id> </TokenPostResponse>