playSMS Forum

[solved] Error when sending via Twilio: Limited number of characters

Good day to all!
If uzzazat in PlaySMS more than 160 characters, when sending via Twilio, I get the following error:

twilio_hook_sendsms # sent smslog_id:239421 message_id: status:400 error:400|21605|The message body exceeds the 160 character limit. smsc:[twilio]

And if you go to the website of Twilio and send an SMS from there that contains more than 160, the SMS will be sent without problems.

Respectfully,
Jamshid Tursunov

Please try this, edit line 39:

from:

$url = $plugin_config['twilio']['url'] . '/2010-04-01/Accounts/' . $plugin_config['twilio']['account_sid'] . '/SMS/Messages.json';

to:

$url = $plugin_config['twilio']['url'] . '/2010-04-01/Accounts/' . $plugin_config['twilio']['account_sid'] . '/Messages.json';

the different is the new one has no SMS/ just before Messages.json

anton

Perfect, fixed!
Big thanks Anton!

1 Like

fix commited:

Thanks!

anton

Thank you again for your product!
Be happy and healthy and take care of yourself!

Respectfully,
Jamshid Tursunov