Retrieve user profile
How to retrieve a user's profile.
Introduction
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 profile
getProfile
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:
venlyConnect.api.getProfile()
Example:
const venlyConnect = new VenlyConnect('YOUR_CLIENT_ID');
venlyConnect.api.getProfile().then((profile) => {
console.log(`Users email, ${profile.email}, has been successfully executed!`);
});
Returns:
{
userId: "4c56c8c3-faba-4475-9334-ff11f0280aed",
username: "[email protected]",
email: "[email protected]",
firstName: "Abdullah",
lastName: "Baig",
nickname: "FulfilledBear",
hasCustodialWallets: false
}
JS Fiddle Example
Function Reference
The function reference describes the different functions that are available in the Widget. For each function, you can find the signature, its parameters, and possible options documented.
Updated 27 days ago