twilio-php | PHP library for communicating with the Twilio REST API | REST library
kandi X-RAY | twilio-php Summary
kandi X-RAY | twilio-php Summary
A PHP library for communicating with the Twilio REST API and generating TwiML.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Makes a Twilio HTTP request .
- Generate curl options .
- Get JWT .
- Validate a URL against expected data .
- Decode JWT .
- Parses a scope URI .
- Load page records .
- Builds an element .
- Convert this object to an array .
- Generate a JWT token .
twilio-php Key Features
twilio-php Examples and Code Snippets
Community Discussions
Trending Discussions on twilio-php
QUESTION
I am trying to do a group conversation following the twilio samples online. I have the conversation and the people are connected (I think) but when I go send a message I get the following error:
...ANSWER
Answered 2021-Apr-26 at 23:16Twilio developer evangelist here.
I think the error codes for this are yet to be published, which I will follow up on internally. I have found some documentation for this error though.
Typical reasons for failure include:
- Less than 3 non-chat participants in the conversation
- There’s a chat participant in the conversation
- There’s an existing group conversation with the exact same participants
- There’s a participant with a
ProjectedAddress
only
Note that a participant with an Identity
and a ProjectedAddress
counts as a non-chat participant.
As far as I can see from your code, you have 4 non-chat participants (notably, the limit for group MMS is 4 participants right now), so that is fine. You have one participant with a ProjectedAddress
and an Identity
, which is fine. There are no participants with only a ProjectedAddress
.
That leaves one potential issue, that there is already an existing group with these exact participants.
In order to check what's going on, I would now do a couple of things.
First, double check that these participants were correctly created and none are missing a property, particularly the participant with the Identity
and ProjectedAddress
.
Then, check to see if you have an existing conversation object that also has these participants.
If neither of those checks comes up with anything, let me know and I'll escalate the ticket you have open.
QUESTION
I'm following Twillio's guide on responding to incoming SMS.
Everything works as expected. I'm getting the webhook and the reply is sent to a verified number (I'm using a trial account).
The problem I'm having is getting the contents of the incoming message. I tried to get the contents through $_POST
and php://input
but both are empty. I want to get the contents in order to send to our info mailbox.
This is my replyToSMS.php:
...ANSWER
Answered 2020-Jan-17 at 23:12Many thanks to @ceejayoz who pointed out the answer. The docs mention that$_REQUEST['Body']
contains the contents of the incoming message.
So it's not neither in $_POST
nor in php://input
. It's in $_REQUEST
which is the object that contains all the data that is sent by Twillio webhook as it sends the API request to your server endpoint.
These are fields that the Request object contains:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install twilio-php
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page