News & Announcements User Community Developer Community

Welcome to the RingCentral Community

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

Search
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
Error sending an MMSmessage
Tags: errors
Oct 14, 2021 at 8:01pm   •   15 replies  •  0 likes
Roger Samuel

When I try to send an MMS message I get:

{ "errorCode" : "InvalidParameter", "message" : "Parameter [attachments] value is invalid.", "errors" : [ { "errorCode" : "CMN-101", "message" : "Parameter [attachments] value is invalid.", "parameterName" : "attachments" } ], "parameterName" : "attachments" }

Does anyone know what's wrong? I have the JSON formatted properly and it worked in the sandbox. Now it does not work in production.


15 Answers
answered on Oct 18, 2021 at 9:52am  

Any more suggestions?


 0
answered on Oct 16, 2021 at 9:04pm  

Yes, my client used my app for their live account . The main login number of their live production account is 720 465 6809



 0
answered on Oct 16, 2021 at 9:59am  

Another issue, it does not even work in the portal "TRY API" option


 0
on Oct 16, 2021 at 8:09pm   •  0 likes

BTW, I check your production account and you don't have one. You signed up for a free tier sandbox account and you created a public app so that other RingCentral customers can login your app with their own credentials to send SMS.

Now tell me how did you try to login the production? Do you login with a customer credentials? If so, what is their account id?

answered on Oct 15, 2021 at 4:26pm  

Roger

888.205.6032

roger@vortext.ca


 0
answered on Oct 15, 2021 at 1:19pm  

Is there anything else I can try? I'm stuck right now?


 0
on Oct 15, 2021 at 1:37pm   •  0 likes

Things must be in your code then. Does it work with just SMS text?

Are you ready to try e.g. the Node JS SDK?

on Oct 15, 2021 at 1:56pm   •  0 likes

I see you are trying to provide service to RingCentral users to use P2P SMS (consumer) for A2P SMS (non-consumer), you will soon cause them getting blocked by mobile carriers.

Are you available for a quick call so I can walk you thru a process and better options? If so, let me know your email address.

answered on Oct 15, 2021 at 10:20am  

It still says:
In order to call this API endpoint, application needs to have [ReadAccounts] permission


 0
on Oct 15, 2021 at 10:54am   •  0 likes

Sorry, I forgot to submit the change. Should be ok to call the API in a min.

answered on Oct 15, 2021 at 4:24am  

Are you using any RC SDK to send message?

If yes, then please put you code sample.

Also, the mms api reference you will get it here

https://community.ringcentral.com/questions/103211/error-sending-an-mmsmessage.html

Can you please try once from here and see if this is working for you? You can get the correct json request generated here


 0
answered on Oct 15, 2021 at 7:40am  

Since you are not using any SDK, I cannot help providing you with sample code.

But you can call this API to read a user's phone numbers and detect if the number is MMS enabled (under the 'features' array "MmsSender".

You should also double check if you have set the server for production "platform.ringcentral.com", the POST request header and make sure that you read and create the attachments properly in your production environment. Many developers have such problems when they run their app okay in their local machine but fails when deployed and run on their remote server.


 0
answered on Oct 15, 2021 at 10:22am  

And also, if I determine that the number does not have MMS access, how would I turn that on?



 0
answered on Oct 15, 2021 at 9:10am  

The full JSON I am sending is:

{ "to": [{"phoneNumber": "+1xxxxxxxxxx"}], "from": {"phoneNumber": "+1xxxxxxxxxx}"}, "text": "Test SMS", "attachments":["data:image/jpeg;name=overlay.png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAEUlEQVR42mNgYGC4iQMPnAQAw/QehVmSyckAAAAASUVORK5CYII="] }

I am sending it to

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/mms
Content-Type: application/json
Accept: application/json


 0
on Oct 15, 2021 at 9:14am   •  0 likes

Did you read the phone number features?

Did you also set the content-type header?

header 'content-type: multipart/form-data'
answered on Oct 15, 2021 at 10:04am  

I added the missing permission to your app so you can now read the phone-number API to detect number features.


 0
answered on Oct 15, 2021 at 9:36am  

I did not request the read permission when I setup the App so I can't access the endpoint.

When I change the content type to multipart/form-data I get a different error:


{ "message" : "Bad Request", "errors" : [ ] }






 0
answered on Oct 15, 2021 at 5:02am  

No SDK just a HTTP request. The format is correct and it worked fine in the sandbox. Is there some kind of MMS permission that has to be added to the sending number?


 0
answered on Oct 14, 2021 at 9:00pm  

{

"to": [{"phoneNumber": "#arguments.to#"}],

"from": {"phoneNumber": "#arguments.from#}"},

"text": "#arguments.message#",

"attachments":["#img#"]

}

img=data:image/jpeg;name=file.jpg;base64,[base64data]


 0
answered on Oct 14, 2021 at 8:57pm  

Post some code where you created the POST body.


 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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

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