const jwt = require('jsonwebtoken');// Create the signed tokenconst token = jwt.sign( payload, 'YOUR_ENC_KEY', // Your Enc Key { algorithm: 'HS256' });// The token can now be used in your API request
const headers = { 'Authorization': `Bearer ${token}`, 'x-auth-key': 'YOUR_AUTH_KEY', 'Content-Type': 'application/json'};// Make your API request with these headers