Register Account
Player registers by entering email and password directly.
Call Information
AccountEmailSignUp(string email, string password, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
Email address entered by player | String | |
password | Password entered by player | String |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string email = "string";
string password = "string";
plugin.AccountEmailSignUp(email, password, (state, errorCode, jsonString, values) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["access_token"].ToString());
Debug.Log(values["refresh_token"].ToString());
Debug.Log(values["uuid"].ToString());
Debug.Log(values["openID"].ToString());
Debug.Log(values["nickname"].ToString());
Debug.Log(values["linkedID"].ToString());
Debug.Log(values["linkedType"].ToString());
Debug.Log(values["country"].ToString());
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Token" : {
"AccessToken" : "String",
"RefreshToken" : "String"
},
"Player" : {
"UserUniqueID" : "String",
"OpenID" : "String",
"Nickname" : "String",
"LinkedID" : "String",
"LinkedType" : "String",
"Country" : "String"
}
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
Token.AccessToken | Player access token | string |
Token.RefreshToken | Player refresh token | string |
Player.UserUniqueID | Player's unique ID | string |
Player.OpenID | Player's unique open ID | string |
Player.Nickname | Player's nickname | string |
Player.LinkedID | Player's linked ID | string |
Player.LinkedType | Player's link type | string |
Player.Country | Player's country code | string |
Error Information
If player information already exists
ErrorCode : 10008
Message : ExistsValueException
If no player information exists
ErrorCode : 30000
Message : NotFoundAccountException
If the email format is incorrect
ErrorCode : 30004
Message : NotMatchEmailFormatException
If player information is being used on another device
ErrorCode : 30006
ErrorMessage : DuplicatedDeviceException