Skip to main content
Version: SDK-5.11.4

IsAccessTokenAlive

public BackendReturnObject IsAccessTokenAlive();

Description

Checks whether the user's current AccessToken is valid for BACKND communication.

Example

Synchronous

BackendReturnObject bro = Backend.BMember.IsAccessTokenAlive();
if(bro.IsSuccess())
{
Debug.Log("AccessToken is alive");
}

Asynchronous

Backend.BMember.IsAccessTokenAlive((callback) =>
{
if(callback.IsSuccess())
Debug.Log("AccessToken is alive");
});

SendQueue

SendQueue.Enqueue(Backend.BMember.IsAccessTokenAlive, (callback) =>
{
if(callback.IsSuccess())
Debug.Log("AccessToken is alive");
});

Return cases

Success cases

When AccessToken is valid
statusCode : 204
message : Success

Error cases

When the user tries token login but there is no local access token in the device
statusCode : 400
errorCode : accessTokenError
message : accessToken not exist

When there is an attempt without customLogin
statusCode : 400
errorCode : UndefinedParameterException
message : undefined access_token, access_token cannot be checked

When AccessToken is invalid
statusCode : 401
errorCode : BadUnauthorizedException
message : bad accessToken, Invalid accessToken