Implement Embedded UI
This page shows how to integrate EmbedUI SDK in your website and access qwestive referral platform right from your Dapp
Last updated
This page shows how to integrate EmbedUI SDK in your website and access qwestive referral platform right from your Dapp
Last updated
Copy below code snippet and paste it in the <head>
or the top of the <body>
tag in your website.
init
apiKey: string projectId: string
generateReferralLinkCallback?: (data) => void (optional)
// Required parameters
Initialize the SDK with API KEY
and projectId
// Optional parameters
generateReferralLinkCallback
is a callback function passed with init method to receive data whenever user generates referral link
Initializing the SDK authenticates the client and validates client's domain against whitelisted domains
added from project settings.
apiKey
can be found from project settings.
Returns the available utility methods:
setAlias
publicKey: string
signup/login referrer/affiliate in EmbedUI with the passed publicKey
logout
-
Log out the user from embedUI
openPopup
-
Opens the EmbedUI popup in the bottom right corner of your Dapp
closePopup
-
Closes the popup
This function should be triggered when the user connects the wallet on your Dapp.
We need to add id attribute to the button/link to trigger user signup/login flow in case user tries to connect wallet from EmbedUI
This function should be triggered when the user disconnect their wallet on your Dapp.
This function should be triggered when user wants to checkout referral program within your Dapp.
This function should be triggered when if you want to close the popup within your Dapp.