Authentication settings

How to set up authentication and headers to use the IG Solution API.

Authentication headers

The Excoinz API typically uses a secret key for Restful API authentication. The secret key can be found in IG Solution Admin.

Authenticate with a secret key

  1. Check my secret key value in IG Solution Admin

  2. Add your secret key to the header

const axios = require('axios');

const REQUEST_PATH = 'ANY_PATH';

const headers = {
  'EXCOINZ_SECRET': `Bearer ${process.env.SECRET_KEY}`,
  'Content-Type': 'application/json'
};

const data = {
  //ANY_DATA
};

axios.post(`https://api.excoinz.com/${REQUEST_PATH}`, data, { headers: headers })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error('Error:', error.response.data);
  });

Last updated