How to call API?
https://app.referralhero.com/api/sdk/v1/Request Headers
{
'Content-Type': 'application/json',
'Accept': 'application/vnd.referralhero.v1',
'Authorization': 'xxxxxxxxxx'
}const apiUrl = 'https://app.referralhero.com/api/sdk/v1/';
const apiToken = 'Your-api-token';
axios.get(`${apiUrl}endpoint`, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/vnd.referralhero.v1',
'Authorization': apiToken
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error making API call', error);
});
Helper Functions
Adding the Subscriber Data
Last updated


