👨‍🚀Unique User Data

With this data API, one can find out the no of unique users who have interacted with the dapp over time.

Fetches unique user data for a particular dapp

GET https://data.biconomy.io/api/v1/dapp/uniqueUserData

Query Parameters

Name
Type
Description

startDate*

String

Format (“MM-DD-YYYY”) example: 21st Jan 2022 would be 01-21-2022

endDate*

String

Format (“MM-DD-YYYY”)

Headers

Name
Type
Description

Content-Type*

String

application/x-www-form-urlencoded

authToken*

String

Token unique to every user account

apiKey*

String

Api Key unique to every dapp

{
    code: 200,
    message: 'Unique user data fetched for dapp with dappId: <YOUR DAPP ID>',
    responseCode: 200,
    uniqueUserData: [
    { date: '03 - 01 - 2022', count: 7, addresses: [Array] },
    { date: '04 - 01 - 2022', count: 17, addresses: [Array] },
    { date: '05 - 01 - 2022', count: 129, addresses: [Array] },
    { date: '06 - 01 - 2022', count: 122, addresses: [Array] },
    { date: '07 - 01 - 2022', count: 165, addresses: [Array] },
    { date: '08 - 01 - 2022', count: 103, addresses: [Array] },
    { date: '09 - 01 - 2022', count: 68, addresses: [Array] }
   ]
}

API Call via NodeJS:

const fetch = require("node-fetch");
const { URL, URLSearchParams } = require('url');
const authToken = "<Account's AUTH TOKEN>";
const apiKey = "<Dapp's API KEY>";
const getUniqueUserData = () => {
    const url = new URL("https://data.biconomy.io/api/v1/dapp/uniqueUserData");

    const params = {
        startDate : "11-14-2021",
        endDate : "01-19-2022"
    }
    
    url.search = new URLSearchParams(params).toString();

    const requestOptions = {
        method: 'GET',
        headers: {  "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey }
    };
    
    fetch(url, requestOptions)
    .then(response => response.json())
    .then(data => console.log(data))     
    .catch(error => console.error('Error:', error));
}

getUniqueUserData()

Last updated