Twilio Messaging Content API (Pilot)

EduardoGonzalez
edited March 4 in WhatsApp API

I have been granted permission to use the Messaging Content API (Pilot). I have managed to create a Content, with an action button with parameters. Also, I created a WhatsApp template using the Content, and it's approved.

The problem is that I cannot send a message using that template. Following the API Docs, I create this POST request (with my params):

curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXX/Messages \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \-H 'Content-Type: application/x-www-form-urlencoded' \
-d "To=whatsapp:+15551234567" \
-d "From=MGXXXXXXXXXXXXXXXXXXX" \
-d "ContentSid=HXXXXXXXXXXXXXXXXXXX" \
-d 'ContentVariables={"1":"OA1337","2":"San Francisco","3":"3:00PM","4":"16","5":"df0sdddf2"}'

And I get this error: ><RestException><Code>21619</Code><Message>A text message body or media urls must be specified.</Message>

So I add a Body param to the POST call and the response seems fine, but I don't receive any WhatsApp message.

Can someone help? Thanks.

<TwilioResponse>
  <Message>
   <Sid>MM48XXXXXXXXXXXXXXXXXXX</Sid>
   <DateCreated>Fri, 04 Mar 2022 11:58:50 +0000</DateCreated>
   <DateUpdated>Fri, 04 Mar 2022 11:58:50 +0000</DateUpdated>
   <DateSent/>
   <AccountSid>ACXXXXXXXXXXXXXXXXXXX</AccountSid>
   <To>whatsapp:+34XXXXXXXXX</To>
   <From>whatsapp:+34XXXXXXXXX</From>
   <MessagingServiceSid/>
   <Body>Body</Body>
   <Status>queued</Status>
   <NumSegments>1</NumSegments>
   <NumMedia>0</NumMedia>
   <Direction>outbound-api</Direction>
   <ApiVersion>2010-04-01</ApiVersion>
   <Price/>
   <PriceUnit/>
   <ErrorCode/>
   <ErrorMessage/>
   <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXX/Messages/MM48XXXXXXXXXXXXXXXXXXX</Uri>
   <SubresourceUris>
     <Media>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXX/Messages/MM48XXXXXXXXXXXXXXXXXXX/Media</Media>
   </SubresourceUris>
  </Message>
</TwilioResponse>


Comments

  • HI @EduardoGonzalez ,

    I'm happy to assist on your question, I wanted to check the account/Whatsapp configuration but i could not find anything with the account used to open this ticket.  Do you mind DMing me your full name, email and account SID and I will create a ticket with support on your behalf.

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support