Retrieve user profile
How to retrieve a user's profile.
To get the profile of a user you need to call the function getProfile, which will return a promise including the user's information.
πŸ§™ If you only want to retrieve a user's profilegetProfile is a perfect function, but if you also need to retrieve his wallets and even authenticate the user, then it is recommended to retrieve the user account.

Function

1
venlyConnect.api.getProfile()
Copied!

Example

1
const venlyConnect = new VenlyConnect('YOUR_CLIENT_ID');
2
venlyConnect.api.getProfile().then((profile) => {
3
console.log(`Users email, ${profile.email}, has been successfully executed!`);
4
});
Copied!

Returns

1
{
2
"userId": "46c87fcb-77ed-4433-a425-814569ca1672",
3
"hasMasterPin": true,
4
"username": "[email protected]",
5
"email": "[email protected]",
6
"firstName": "Karel",
7
"lastName": "Striegel"
8
}
9
​
Copied!

Function Reference

The function reference describes the different functions that are available in the Widget. For each function, you can find the signature, it's parameters, and possible options documented.
Last modified 7d ago