my.getAuthCode
Get authentication code.
Sample Code
copy
my.getAuthCode({
scopes: 'auth_user',
success: (res) => {
my.alert({
content: res.authCode,
});
},
});
Parameters
Name | Type | Mandatory | Description |
scopes | String/Array | N | The scope of auth, there are two types: auth_base , auth_user , by default, its value is auth_base |
Success Callback Function
The incoming parameter is of the Object type with the following attributes:
Field | Type | Mandatory | Description |
authCode | String | Y | Auth code |
authErrorScopes | Key-value | Y | The scope that failed to grant auth, key is the scope and value is the error |
authSuccessScopes | Array | Y | The scope that succeed to grant auth |
Supported Auth Scopes
Precautions
- The auth scopes are case sensitive.
- The
Silent
field means whether you need to get the user consent (show permission page) or not. - The
Preassign
field means whether the scope is assigned by default to the merchant without needing to apply to business before using.
Check the data model for more details.
Scope | Silent | Preassign | Data Points |
auth_base / BASE_USER_INFO | Yes | Yes | • Wallet Account ID |
auth_user / USER_INFO | No | Yes | • Registered Name • Registered Mobile Number • Registered Email Address |
USER_NAME | No | No | • Profile Name |
USER_AVATAR | No | No | • Profile Picture |
USER_GENDER | No | No | • Gender TNGD does not save Gender as mandatory field. Partners advised to derive Gender from NRIC number |
USER_BIRTHDAY | No | No | • Date of Birthday |
USER_NATIONALITY | No | No | • Nationality |
USER_CONTACTINFO | No | No | • Verified Mobile Number • Profile Email Address |
USER_ADDRESS | No | No | • Address |
USER_INFO_EKYC | No | No | • Verified Name • ID Type • ID Number • Nationality • Address • Date of Birth • Occupation • Nature of Business |