I'm currently collaborating with a service called Sheetlabs to transform a Google Sheet into a full-fledged API. Unfortunately, I'm struggling to find useful resources online apart from the Sheetlabs documentation, as it appears to be a relatively niche service at this stage.
My approach involves using axios within a customized function in Twilio to transmit data to our Sheetlabs API. The API specifically requires HTTP Basic authentication.
I've experimented with various iterations of my axios request, attempting to adhere to the guidance provided in the Sheetlabs SwaggerHub Documentation but I'm feeling stuck.
const url = 'https://sheetlabs.com/records/{organization}/{dbName}';
const postData = {
trackingid: `${trackingUrl}`,
phonenumber: `${userPhoneNumber}`
}
const authParams = {
username: //sheetlabs email,
password: //access token
}
// axios function
axios.post(url, postData, {auth: authParams}).then(response => {
console.log('response: ', response);
}).catch(err => {
console.log('axios sheetlabs post error catch: ', err);
});
Any assistance you can provide would be greatly valued. I'm prepared to furnish any additional details you may require.