Skip to main content

Authenticate Account

Player registers by entering email and password directly.

Call Information

AccountEmailSignIn(string email, string password, PlayNANOODelegate callback) {}

Call Information Details

ParameterDescriptionType
emailEmail address entered by playerString
passwordPassword entered by playerString
callbackCommunication resultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string email = "string";
string password = "string";
plugin.AccountEmailSignIn(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 {
if (values != null)
{
if (values["ErrorCode"].ToString() == "30007")
{
Debug.Log(values["WithdrawalKey"].ToString());
}
else if (values["ErrorCode"].ToString() == "70002")
{
Debug.Log(values["BlockKey"].ToString());
}
else
{
Debug.Log("Fail");
}
}
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"
}
}

Response Information Details

Data KeyDescriptionType
Token.AccessTokenPlayer access tokenstring
Token.RefreshTokenPlayer refresh tokenstring
Player.UserUniqueIDPlayer's unique IDstring
Player.OpenIDPlayer's unique open IDstring
Player.NicknamePlayer's nicknamestring
Player.LinkedIDPlayer's link IDstring
Player.LinkedTypePlayer's link typestring
Player.CountryPlayer's country codestring
WithdrawalKeyAccount withdrawal query keystring

Error Information

If no player information exists
ErrorCode : 30000
ErrorMessage : NotFoundAccountException

If player information does not match
ErrorCode : 30001
ErrorMessage : NotMatchAccountException

If email format is incorrect
ErrorCode : 30004
Message : NotMatchEmailFormatException

If player information is being used on another device
ErrorCode : 30006
ErrorMessage : DuplicatedDeviceException

If player has requested withdrawal
ErrorCode : 30007
ErrorMessage : WithDrawalException