Before we can get started, you should retrieve your API Key for your integration from the BitLabs Dashboard. If you haven't created an account yet, you can do so here and follow the instructions for the dashboard starting with Sign up & Set up..
It is possible to embed the offerwall in an iFrame. Please note that a new tab will be opened for the user to take the survey if you choose to do so.
The offerwall will open in their browser where they can complete surveys in exchange for your virtual currency.
You can send your users into the BitLabs offerwall just by opening a link. You can configure the behavior of the offerwall what should happen after a survey is completed on the BitLabs dashboard in the General Settings.
// This will open the offerwall in a new tab window.open('https://web.bitlabs.ai/?uid=test1234&token=5fec306d-039a-41f3-94be-56ae3e74b41f', '_blank') // URL Structure: https://web.bitlabs.ai/?uid=[USER_ID]&token=[YOUR_API_TOKEN]
This is where you will need the API key from the dashboard, as you will need to replace "YOUR_API_TOKEN" with it. For "USER_ID", you will need to dynamically insert the user id for each app user. Make sure the id used here is unique and that it does not change, as the user's profile will be stored under this id.
Updated 2 months ago
You have now implemented BitLabs with your project. If you haven't done it already, it is time to configure server-to-server callbacks and the look and feel of your app.