Public APIs - Guide for developers to access our endpoints.

This documentation will guide developers through all the information needed to access our API endpoints that are used to retrieve quiz data programatically.

Context

  1. Generating secret key
  2. Why the secret key?
  3. How to generate the token?
  4. How can we access the data - API endpoints?

Step - 1. Generating secret key

Step - 2. Why secret/public key?

Step - 3. How to generate the token?

Python

**jwt.encode(payload, JWT_SECRET, JWT_ALGORITHM)**
# Payload - Data to be passed - If no data to be passed - payload will be {}
#JWT_SECRET - Secret key from the account
#JWT_ALGORITHM - HS256

JavaScript

import jwtEncode from '<https://cdn.jsdelivr.net/npm/[email protected]/+esm>';

const secret = 'VQB Private API key / JWT_SECRET';
const data = {};
const jwt = jwtEncode(data, secret);

console.log(jwt);

STEP - 4. How can we access the data - API endpoints?