im literally just following the code on this site but I am having this error, not sure why
// https://github.com/visionmedia/superagent#install
const superagent = require('superagent');
superagent
.auth('my strings')
.post(`https://api.telnyx.com/2010-04-01/Accounts/my string/Messages.json`)
.send({
From: '', // Your Telnyx number
To: '',
Body: "Is this working, World!"
})
.then((response) => {
console.log(response.body);
});
note: i just wrote my strings in place of the actual code for privacy
method comes first, reverse it:
...post().auth()...: