Twilio Integration

#1

Hi,

Im having some trouble using the Twilio sms feature, see error message below. Do you know what this is?
“Error: wrapped org.mozilla.javascript.EcmaError: TypeError: Cannot read property “value” from null (Twilio_sms.js#4)”

I think this might be related to the fact that I have not added my Twilio account to the platform. Can you also tell me where I need to add my account credentials?

Thanks

0 Likes

#2

Hi,

What command was it that creates this error? In general, there are a few prerequisites you have to do in your C3 environment before you’re Twilio-enabled:

Configure the following:

  • Twilio API endpoint (it’s “https://api.twilio.com/2010-04-01” until they update Twilio changes their API)
  • Twilio authentication token (get this in Twilio’s web UI)
  • Twilio sid (get this in Twilio’s web UI)
  • Twilio phone number (get this in Twilio’s web UI)

As an example, using C3 console commands, do this:

  • TenantConfig.upsert(TenantConfig.make({id:“twilio.api.url”, value:“https://api.twilio.com/2010-04-01”}))
  • TenantConfig.upsert(TenantConfig.make({id:“twilio.api.auth”, value:“Basic [YOUR-TWILIO-AUTH-TOKEN]”}))
  • TenantConfig.upsert(TenantConfig.make({id:“twilio.api.sid”, value:"[YOUR-TWILIO-SID]"}))
  • TenantConfig.upsert(TenantConfig.make({id:“twilio.api.from”, value:"[YOUR-TWILIO-PHONE-NUMBEr]"}))

Let me know if this doesn’t solve your issue.

Daniel

0 Likes