Links
🌎

Dashboard APIs

Using these APIs you can perform actions that you can do on dashboard UI like creating or deleting smart contracts or a method of the contract without manually accessing the dashboard.

Generate AUTH token

  1. 1.
    Register & Login to https://dashboard.biconomy.io/​
  2. 2.
    Go to the "Account" tab on left menu to view your Auth Token.
  3. 3.
    You can regenerate you Auth Token by clicking on the Regenerate Token button.
post
https://api.biconomy.io
/api/v1/dapp/public-api/create-dapp
API to create a new dapp
post
https://api.biconomy.io
/api/v1/smart-contract/public-api/addContract
API to add a new smart contract for a given dapp
delete
https://api.biconomy.io
/api/v1/smart-contract/public-api/deleteContract
API to delete a smart contract from dashboard for a given dapp
post
https://api.biconomy.io
/api/v1/meta-api/public-api/addMethod
API to add a method for a given dapp and smart contract address
delete
https://api.biconomy.io
/api/v1/meta-api/public-api/addMethod
API to delete a method for a given dapp and smart contract address
post
https://api.biconomy.io/api/v1/dapp/register-webhook
You can register webhooks (post and get API calls) which would be executed before sending a transaction.
patch
https://api.biconomy.io/api/v1/dapp/update-webhook
In case you want to activate or deactivate your current webhook

Dashboard APIs from backend

Adding a Dapp

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/dapp/public-api/create-dapp";
​
let formData = new URLSearchParams({
"dappName" : "dapp-test-2",
"networkId" : "80001",
"enableBiconomyWallet": true
})
​
const requestOptions = {
method: 'POST',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
​

Adding a smart contract

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/smart-contract/public-api/addContract";
var abi = JSON.stringify(<Add your contract's ABI>);
var formData = new URLSearchParams({
"contractName" : "<contract name>",
"contractAddress" : "<contract address>",
"abi" : abi,
"contractType" : "<contract type>",
"metaTransactionType": "<meta transaction type>"
});
const requestOptions = {
method: 'POST',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey },
body: formData
};
​
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Deleting a smart contract

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/smart-contract/public-api/deleteContract";
var formData = new URLSearchParams({
"contractAddress" : "<contract address>",
"contractType" : "<contract type>",
});
const requestOptions = {
method: 'DELETE',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Adding a meta API

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/meta-api/public-api/addMethod";
let formData = new URLSearchParams({
"apiType" : "<native/custom>",
"methodType" : "<read/write>",
"name": "<placeholder name for the method>",
"contractAddress" : "<contract address>",
"method" : "<contract's method name>"
})
​
const requestOptions = {
method: 'POST',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Deleting a meta API

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/meta-api/public-api/deleteMethod";
let formData = new URLSearchParams({
"contractAddress" : "<contract address>",
"method" : "<contract's method name>"
})
​
const requestOptions = {
method: 'DELETE',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": authToken, "apiKey" : apiKey },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Registering A Webhook

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/dapp/register-webhook";
​
let formData = new URLSearchParams({
"webHook" : "https://2j6v8c5ee6.execute-api.ap-south-1.amazonaws.com/v0/check",
"requestType" : "post", // post or get
})
​
const requestOptions = {
method: 'POST',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": '8ee71107-5ce2-4eba-8978-fe51df4bdce2', "apiKey": 'iMVt-8yws.b303c5bd-b405-4e1b-ac66-d1d6d40001b2' },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Updating A Webhook

const fetch = require("node-fetch");
const authToken = <AUTH Token to be generated from dashboard>;
const apiKey = <Dapp's API Key>;
const url = "https://api.biconomy.io/api/v1/dapp/update-webhook";
​
let formData = new URLSearchParams({
"webHookId" : "d9a6e587-0fea-4e06-a1ea-bce0e5b9c410",
"active": "false"
})
​
const requestOptions = {
method: 'PATCH',
headers: { "Content-Type": "application/x-www-form-urlencoded", "authToken": '8ee71107-5ce2-4eba-8978-fe51df4bdce2', "apiKey": 'iMVt-8yws.b303c5bd-b405-4e1b-ac66-d1d6d40001b2' },
body: formData
};
​
fetch(url, requestOptions)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));