I’m having a problem where I use the Twilio Node.js to send a text message. After creating the Twilio client object and passing in my credentials, I make a call to client.messages.create() to send the SMS. This works perfectly fine in my local environment, but fails in production with no errors.
Here’s what I know:
- It’s not a problem with access to environment variables since I’ve temporarily hardcoded in my tokens.
- When I enable debug level logging of the Twilio client, on my local machine it logs both a request and response (and of course the SMS is sent successfully).
- In the Netlify function logs, it does log the request, but not a response. There is no error caught.