Authentication settings
How to set up authentication and headers to use the ExPay API.
Authentication headers
The Excoinz API typically uses a secret key for Restful API authentication. The secret key can be found in ExPay Admin.
Authenticate with a secret key
Check my secret key value in ExPay Admin
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