Skip to main content

getPublicProfile

Note
Please contact Zalopay Team to be granted permission to use this functionality.

Mô tả​

To get public user profile. Please contact Zalopay Team.

Parameters​

ParamData typeRequiredDescription
appIdnumberYespayment Id

Return Value​

ParamData typeDescription
userIdstringmerchant user id (unique)
userNamestringuser name
userAvatarstringuser avatar

Error Code​

Error CodeDescription
030702getPublicProfile: Invalid Argument
030703getPublicProfile: System Error
030704getPublicProfile: Unauthenticated

Sample Code and Sample Return Data​

Sample Request:

window.zlpSdk.User.getPublicProfile({
appId: 999,
})
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));

Sample Response:

{
"data": {
"userId": "YSgQtcUuBUyRhEPdE8slAIZfpaAM90oeKdcT_0o6QZQ",
"userName": "display name",
"userAvatar": "avatar"
},
"status": "success"
}