News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
400 bad request on send MMS
Tags: rest api
Dec 19, 2019 at 3:30am   •   2 replies  •  0 likes
Roman Rozum


I'm trying to send a mms-message using

I filled all the data in ".env". Here all correctly (I have goes send sms)

$ php send-sms.php
Message sent. Message delivery status: Queued

The message does reach (I check Glip chat)

But mms message cannot be sent. Get the error:

$ php send-mms.php
Expected HTTP Error: 400 Bad Request (and additional error happened during JSON parse: Response is not JSON)

And moreover, if we consider the response in more detail, it contains only the text of the error "Bad request" and nothing else.

I tried sending a very small file (~100 bytes). And it works!

Message sent. Message delivery status: Queued

I don't understand how it should work and how I should use it in my app. I think it's some kind of bug and it should not be. Tell me, what should I do with it?

2 Answers
answered on Dec 19, 2019 at 8:26am  

You said you send a very small file and it works, that means that the code is working as expected. I doubt that you try to send some big file or unsupported content. So check out the MMS capabilities below.

RingCentral supported MMS content types

  • Images: jpg/jpeg, png, gif, bmp, tif/tiff, svg
  • Videos: 3gp, mp4, mpeg, flv, wmv, mov
  • Audio: mp3
  • Files: vcf/vcard, zip, rtf, html

Attachment size limit

The maximum size for MMS is carrier-dependent and normally around 1.2MB to 1.4MB.

You can send multiple attachments in a single MMS message. But the total size of attachments should not exceed the size limit above!

Also, if you want to see more from the error, change or print whatever from the exception you want to see within this block:

}catch (\RingCentral\SDK\Http\ApiException $e) {
  print 'Expected HTTP Error: ' . $e->getMessage() . PHP_EOL;

answered on Dec 19, 2019 at 8:58am  

@Phong Vu

I am sending a jpg which is attached in the project (test.jpg). It has a size of 16.1 KB.

I know about the ability to get additional information from the Exception. But the $e does not contain anything except "code" - 400 and "message" - Bad Request


Prints this object:

object(GuzzleHttp\Psr7\Response)#45 (6) {
  string(11) "Bad Request"
  array(4) {
    array(1) {
      string(5) "nginx"
    array(1) {
      string(29) "Thu, 19 Dec 2019 16:45:36 GMT"
    array(1) {
      string(1) "0"
    array(1) {
      string(5) "close"
  array(4) {
    string(6) "Server"
    string(4) "Date"
    string(14) "Content-Length"
    string(10) "Connection"
  string(3) "1.1"
  object(GuzzleHttp\Psr7\Stream)#43 (7) {
    resource(75) of type (stream)
    string(10) "php://temp"
    array(0) {


A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

Resource center
Product Releases
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us