1

I followed the tutorial described here: https://www.twilio.com/docs/conversations/api/service-resource

The following code returns "TypeError: Cannot read property 'create' of undefined"

const twilioClient = twilio(twilioAccountSid, twilioAuthToken);
twilioClient.conversations.services
                .create({friendlyName: 'friendly_name'})
                .then(service => console.log(service.sid));

I was able to use the conversations resource API so I know my twilioClient is correct. The problem only occurs if I use ".services"

Any help greatly appreciated.

Logan Cundiff
  • 479
  • 8
  • 13

1 Answers1

0

Turns out the answer was to upgrade Twilio version. I cannot find where in documentation it specifies newer than 3.39.1 is required for the conversations/services API call. However, upgrading to 3.72.0 solved my issue.

Hope this is helpful to someone that runs across similar issue.

Logan Cundiff
  • 479
  • 8
  • 13