Skip to main content

User status management

Overview#

This document describes how to check and retrieve the user status from the iOS SDK.


Check User Status#

To check the user status, getMe() from GuardianSdk can be used to call the API.
User status may be one of the following types :
registered user, not registered user, withdrawn user, temporarily suspended user...etc.

Parameter#

  • none

Example#

// User status check GuardianAPI.sharedInstance.getMe { rtCode, name, userKey, date, authType in        DispatchQueue.main.async {            ...        }    } onFailed: { errCode, errMsg in            ...    }

MeResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message
datamapUser ID
. User name
. Email
. Phone number
. Additional authentication type
. Last updated date

The rtCode will be 0 if the user is properly registered, and the information of that user will come as a data.
However, if that specific user doesn't exist or is a withdrawn user, the result code and message will appear as follows.

ResultCode#

Result CodeDescriptionSolution
2007 or 2008Unregistered user or different mobile device- In case of unregistered user, check sign in status and register if necessary
- If the mobile device has been changed, register new device
5005Unauthorized userContact the person in charge to solve this matter
5006Temporarily suspended userContact the person in charge to solve this matter
5007Permanently suspended userContact the person in charge to solve this matter
5008Withdrawn userUser accounts can be reactivated within a certain period of time

ErrorResult#

KeyValueDescription
errorCodeIntError code
errorMessageStringError message

If API call fails, the user will receive an errorCode