Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twilio messaging will no longer work after their migration to content templates for Whatsapp #369

Closed
ykamin-booth opened this issue Jan 18, 2024 · 1 comment

Comments

@ykamin-booth
Copy link

Hi, those of us who use Twilio with Whatsapp integration got an email this week informing us that later this year, they will be deprecating the "body" parameter for Twilio Whatsapp messages (see here). Previously, they would match the body parameter to existing approved Whatsapp templates before rendering the message. However, they have migrated all of our Whatsapp templates to Content Templates and will require us to send a content_sid parameter and a content_variables parameter in order to send the message (see here). My suggested fix for this is to update the "format" function in Twilio Messaging to accept those parameters.

@excid3
Copy link
Owner

excid3 commented Jan 18, 2024

This is already supported. Just provide the json option.

deliver_by :twilio_messaging do |config|
  config.json = -> {
    {
       From: "+1234567890",
       To: recipient.phone_number,
       ContentSid: "value",
       ContentVariables: {1: recipient.first_name}
    }
  }
end

@excid3 excid3 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants