Skip to main content

Validate Token

Checks the status of the PlayNANOO authentication token.

Call Information

TokenStatus(string accessToken, PlayNANOODelegate callback) {}

Call Details

ParameterDescriptionType
accessTokenPlayNANOO Access Tokenstring
callbackCommunication ResultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

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

string accessToken = "string";
plugin.AccountManagerV20240401.TokenStatus(accessToken, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["status"].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");
}
}
});
}
}

Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}

Response Details

Data KeyDescriptionType
StatusAuthentication token status
CONNECTED : Normal
string
WithdrawalKeyWithdrawal account lookup keystring

Error Information

If player information does not exist. ErrorCode : 30000 ErrorMessage : NotFoundAccountException

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

If the token has expired ErrorCode : 30002 ErrorMessage : ExpiredTokenException

If the token does not exist ErrorCode : 30005 Message : NullTokenException

If the player has requested withdrawal ErrorCode : 30007 ErrorMessage : WithDrawalException