Simple authorization

Simple authorization provides a minimal level of security. It only requires an API key in the header.

const apiKey = "YOUR_API_KEY"; // put here your api key

const url = "<https://api.numapay.com">;  
const path = "/api/v1/account";  
const body = {}; // empty object for GET request

const options = {  
  method: "GET",  
  headers: {  
    accept: "application/json",  
    "Content-Type": "application/json",  
    "x-api-key": apiKey,  
  },  
  body: JSON.stringify(body),  
};

fetch(url + path, options)  
  .then((response) => response.json())  
  .then((showResponse) => console.log(showResponse.data));