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 while sending mms using sandbox credentials in office api console
Tags: rest api
Nov 29, 2020 at 10:15am   •   4 replies  •  0 likes
Constantine Kanarakis

I'm having issues while sending mms using sandbox phone number.

My app has not been graduated yet for production.

When I'm using sandbox no for sending mms in office api console: it gives error: parameter[object object] is invalid, from number does not belong to you.


when i'm using same in curl format it gives 101 error as parameter value is invalid both in app and postman.

However I am able to send msgs from same number successfully.

Don't know whats the issue.

Having doubt that when app is in production then we can send mms from prod number?

Any help would be much appreciated.

Thanks

4 Answers
answered on Dec 1, 2020 at 6:27pm  

Hi Constantine, you can try our Embeddable widget in sandbox to find what data to send in MMS api.

https://ringcentral.github.io/ringcentral-embeddable
How to switch sandbox environment: https://github.com/ringcentral/ringcentral-embeddable/issues/97#issuecomment-377537326


 0
on Dec 2, 2020 at 5:34am   •  0 likes

MMS is getting sent from widget successfully , but not from sms api.

Thanks for your help .

answered on Dec 1, 2020 at 8:09am  
  • {"errorCode":"InvalidParameter","message":"Parameter [attachments] value is invalid.","errors":[{"errorCode":"CMN-101","message":"Parameter [attachments] value is invalid.","parameterName":"attachments"}],"parameterName":"attachments"}

I'm having this error while calling the mms api.

Thanks for your help


 0
on Dec 1, 2020 at 9:13am   •  0 likes

I can't see your code so I still cannot say why. But the error message is clear that "invalid" parameter and that means your input IS NOT correct. It could be the media content is not supported. You can quick test by sending a simple small .png or .jpg image to see if it gets thru.

on Dec 1, 2020 at 9:16am   •  0 likes

lists = List();

res5 = zoho.encryption.base64Encode(get_attachments);

// info res5;

attch = Map();

attch.put("type","multipart form-data");

attch.put("name",get_attachments);

// attch.put("base64",res5);

data = "type:image/jpeg;" + "name=" + get_attachments + ";base64," + res5;

lists.add(data);

params.put("attachments",lists);

info params;

send_mms = invokeurl

[

url :"https://platform.devtest.ringcentral.com/restapi/v1.0/account/" + accID + "/extension/" + extensionId + "/mms"

type :POST

parameters:params.toString()

headers:header

];

info send_mms;


on Dec 1, 2020 at 9:18am   •  1 likes

url :"https://platform.devtest.ringcentral.com/restapi/v1.0/account/"; + accID + "/extension/" + extensionId + "/mms"

There is no such an API called "/mms". Change it to "/sms"

/sms with an attachment is MMS

on Dec 1, 2020 at 9:32am   •  0 likes

its showing the same error .

sending a png file and value in attachement as :

data = "type:image/png;" + "name=" + get_attachments + ";base64," + res5;

on Dec 1, 2020 at 10:13am   •  0 likes

I am not sure what's wrong in your code and in Zoho integration. I believe it's wrong with the way to attach binary attachment.

Can you just run one of these scripts from your local machine

https://developers.ringcentral.com/guide/messaging/sms/sending-images#javascript

on Dec 1, 2020 at 10:46am   •  0 likes

fax api is also working fine ,

don't know whats causing the issue.

from office api console i got error parameter [object object ] , from number does not belong to you

for sandbox environments

on Dec 1, 2020 at 10:50am   •  0 likes

This " from number does not belong to you" is a different issue. It is clearly you are trying to send from a phone number which is not owned by the extension being logged in the console.

https://medium.com/ringcentral-developers/ringcentral-sms-from-phone-number-fd34fc382181

on Dec 1, 2020 at 11:08am   •  0 likes


2020-12-02.png

this is the response from office api console


on Dec 1, 2020 at 11:40am   •  0 likes

I think the API Reference try form is just broken. You should test with your own code as I showed you on the link above.

on Dec 1, 2020 at 11:05am   •  0 likes

Yes I know , but same number I'm using for sending sms fax and for other apis , and its working absolutely fine both from console and zoho app .

This number is generated when I created the app on ringcentral .

Its a sandbox phone number

on Dec 1, 2020 at 9:28am   •  0 likes

I copied the api from office api reference , probably the format is incorrect also ,{"to":[{"phoneNumber":"514-774-6850"}],"from":{"phoneNumber":"+12897190930"},"text":"Made in André Martin contact","attachments":["type:image/jpeg;name=unnamed.png;base64,


this is the format , that i'm passing and base64 value is also attached with this

answered on Nov 30, 2020 at 7:32am  

How your app will eventually be used in the production? Using Postman only? Don't you write your app in some programming language? If yes, why don't you call the API from your app?


 1
answered on Nov 30, 2020 at 8:26pm  

called the api from app also , but did not worked.

I'm doing zoho crm integration .

So the api code is in zoho custom function


 0
on Nov 30, 2020 at 8:54pm   •  1 likes

Can you call from your code and print out the error. Without the error or trace, I can't help.



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