aj11
7
Ok so this is sooo close!
I got Twilio to accept the call, but turns out you were right and according to Twilio support (and the tests I ran) the multiple Urls need to be sent in separate parameters (not as a list).
So taking this into account, the body looks like this:
Body=<body>&From=<from>&To=<to>&MediaUrl=<mediaurl1>&MediaUrl=<mediaurl2>&MediaUrl=<mediaurl3>&MediaUrl=<mediaurl4>&MediaUrl=<mediaurl5>&MediaUrl=<mediaurl6>&MediaUrl=<mediaurl7>&MediaUrl=<mediaurl8>&MediaUrl=<mediaurl9>&MediaUrl=<mediaurl10>
This call WORKS, but only if ALL the MediaUrl parameters have a URL in them. If I want to send a message with just one piece of media (instead of 10) I get a error response that the values are null and therefore invalid.
Now, I could create 11 different calls in API connector and call the one with the right number of parameters depending on the number of images being sent from my app, but that’s a bit of a mess. Is there anyway to set up the body so that the MediaUrl parameters are optional the way that you can make them if they are a regular parameter in API connector?