PlayerIO

The fastest way to build online games without breaking a sweat.

.NET Client Reference

Multiplayer  class documentationClass QuickConnect

Namespace: PlayerIOClient
Language: C# / .NET

Entry class for making a QuickConnect connection to Player.IO

Here is an example on how to register a new SimpleUser:

And a returning user can connect like this:

After registering or connecting, you get a Client object which you can then use just as if you used the regular Connect method.

Note that unlike the regular Connect method you don't specify the name of the connection to use, instead you set this up in the QuickConnect admin panel for your game.

Methods

 
public void
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a Facebook user using a Facebook access_token.

public Client
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments)

Authenticates a Facebook user using a Facebook access_token.

public void
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a Facebook user using a Facebook access_token.

public void
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a Kongregate user and returns a connection token.

public void
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a Kongregate user and returns a connection token.

public Client
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments)

Authenticates a Kongregate user and returns a connection token.

public Client
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments)

Authenticates a user in the simple user db and returns a connection token.

public void
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a user in the simple user db and returns a connection token.

public void
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a user in the simple user db and returns a connection token.

public SimpleGetCaptchaOutput
SimpleGetCaptcha (string gameId, int width, int height)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

public void
SimpleGetCaptcha (string gameId, int width, int height, Callback<SimpleGetCaptchaOutput> successCallback)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

public void
SimpleGetCaptcha (string gameId, int width, int height, Callback<SimpleGetCaptchaOutput> successCallback, Callback<PlayerIOError> errorCallback)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail, Callback successCallback, Callback<PlayerIOError> errorCallback)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail, Callback successCallback)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

public void
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIORegistrationError> errorCallback)

Registers a new user in the simple user db and returns a connection token.

public Client
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments)

Registers a new user in the simple user db and returns a connection token.

public void
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback)

Registers a new user in the simple user db and returns a connection token.

QuickConnect.FacebookOAuthConnect

public void
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a Facebook user using a Facebook access_token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string access_token
The Facebook access_token for the user.
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful

QuickConnect.FacebookOAuthConnect

public Client
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments)

Authenticates a Facebook user using a Facebook access_token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string access_token
The Facebook access_token for the user.
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.

QuickConnect.FacebookOAuthConnect

public void
FacebookOAuthConnect (string gameId, string access_token, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a Facebook user using a Facebook access_token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string access_token
The Facebook access_token for the user.
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs.

QuickConnect.KongregateConnect

public void
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a Kongregate user and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string userId
The Kongregate user id of the user you wish to authenticate.
string gameAuthToken
The Kongregate game auth token of the user's session.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs.

QuickConnect.KongregateConnect

public void
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a Kongregate user and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string userId
The Kongregate user id of the user you wish to authenticate.
string gameAuthToken
The Kongregate game auth token of the user's session.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful

QuickConnect.KongregateConnect

public Client
KongregateConnect (string gameId, string userId, string gameAuthToken, String[] playerInsightSegments)

Authenticates a Kongregate user and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string userId
The Kongregate user id of the user you wish to authenticate.
string gameAuthToken
The Kongregate game auth token of the user's session.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.

QuickConnect.SimpleConnect

public Client
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments)

Authenticates a user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string usernameOrEmail
The username or email of the user you wish to authenticate.
string password
The password of the user you wish to authenticate.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.

QuickConnect.SimpleConnect

public void
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments, Callback<Client> successCallback)

Authenticates a user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string usernameOrEmail
The username or email of the user you wish to authenticate.
string password
The password of the user you wish to authenticate.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful

QuickConnect.SimpleConnect

public void
SimpleConnect (string gameId, string usernameOrEmail, string password, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback)

Authenticates a user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel
string usernameOrEmail
The username or email of the user you wish to authenticate.
string password
The password of the user you wish to authenticate.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs.

QuickConnect.SimpleGetCaptcha

public SimpleGetCaptchaOutput
SimpleGetCaptcha (string gameId, int width, int height)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
int width
The width of the Captcha image.
int height
The height of the Captcha image.

QuickConnect.SimpleGetCaptcha

public void
SimpleGetCaptcha (string gameId, int width, int height, Callback<SimpleGetCaptchaOutput> successCallback)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
int width
The width of the Captcha image.
int height
The height of the Captcha image.
Callback<SimpleGetCaptchaOutput> successCallback
Callback with information about the captcha image, if successful

QuickConnect.SimpleGetCaptcha

public void
SimpleGetCaptcha (string gameId, int width, int height, Callback<SimpleGetCaptchaOutput> successCallback, Callback<PlayerIOError> errorCallback)

Creates a Captcha image and key, to be used for registrations where the added security of Captcha is required..

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
int width
The width of the Captcha image.
int height
The height of the Captcha image.
Callback<SimpleGetCaptchaOutput> successCallback
Callback with information about the captcha image, if successful
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs.

QuickConnect.SimpleRecoverPassword

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail, Callback successCallback, Callback<PlayerIOError> errorCallback)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

Arguments

string gameId
The game id of the game the user is registered in.
string usernameOrEmail
The username or email address of the user that wishes to recover his password.
Callback successCallback
Callback if successful
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs.

QuickConnect.SimpleRecoverPassword

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

Arguments

string gameId
The game id of the game the user is registered in.
string usernameOrEmail
The username or email address of the user that wishes to recover his password.

QuickConnect.SimpleRecoverPassword

public void
SimpleRecoverPassword (string gameId, string usernameOrEmail, Callback successCallback)

Initiates the password recovery process for a user. The user must have supplied an email address during registration.

Arguments

string gameId
The game id of the game the user is registered in.
string usernameOrEmail
The username or email address of the user that wishes to recover his password.
Callback successCallback
Callback if successful

QuickConnect.SimpleRegister

public void
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback, Callback<PlayerIORegistrationError> errorCallback)

Registers a new user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
string username
The username of the new user.
string password
The password of the new user.
string email
The email of the new user. (optional)
string captchaKey
(only if captcha is required) The key of the Captcha image used to get the user to write in the Captcha value
string captchaValue
(only if captcha is required) The string the user entered in response to the captcha image
Dictionary<string, string> extraData
Any extra data that you wish to store with the user such as gender, birthdate, etc. (optional)
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful
Callback<PlayerIORegistrationError> errorCallback
Callback with details about why the registration failed, if it failed.

QuickConnect.SimpleRegister

public Client
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments)

Registers a new user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
string username
The username of the new user.
string password
The password of the new user.
string email
The email of the new user. (optional)
string captchaKey
(only if captcha is required) The key of the Captcha image used to get the user to write in the Captcha value
string captchaValue
(only if captcha is required) The string the user entered in response to the captcha image
Dictionary<string, string> extraData
Any extra data that you wish to store with the user such as gender, birthdate, etc. (optional)
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.

QuickConnect.SimpleRegister

public void
SimpleRegister (string gameId, string username, string password, string email, string captchaKey, string captchaValue, Dictionary<string, string> extraData, string partnerId, String[] playerInsightSegments, Callback<Client> successCallback)

Registers a new user in the simple user db and returns a connection token.

Arguments

string gameId
The game id of the game you wish to connect to. This value can be found in the admin panel.
string username
The username of the new user.
string password
The password of the new user.
string email
The email of the new user. (optional)
string captchaKey
(only if captcha is required) The key of the Captcha image used to get the user to write in the Captcha value
string captchaValue
(only if captcha is required) The string the user entered in response to the captcha image
Dictionary<string, string> extraData
Any extra data that you wish to store with the user such as gender, birthdate, etc. (optional)
string partnerId
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system.
String[] playerInsightSegments
Custom segments for the user in PlayerInsight.
Callback<Client> successCallback
Callback with the connected client, if successful