Skip to content

GET /generateJWT/<api-key>

Generate a new token JWT if the provided api key, as query params, exists and is enbaled.

Usage

const axios = require('axios');
const {ethers}  = require("ethers")

const endpoint = https://pablock-api-dev.bcode.cloud
const apiKey = '<your-api-key>'
const wallet = ethers.Wallet.createRandom()

let { status, data } = await axios.get(
    `${endpoint}/generateJWT/${apiKey}/${wallet.address}`
);

const tokenJWT = data.authToken