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 » Users
MMS C# Error
Tags: errors
Mar 4, 2021 at 9:57am   •   3 replies  •  0 likes
Brian Ford

I'm following the tutorial at

Everything work fine when sending the Sms message but when I try the Mms example I get as compile error stating "Argument 2: cannot convert from 'RingCentral.Attachments[]' to 'RingCentral.RestRequestConfig'. The error is on line 56 of the above tutorial:

var resp = await rc.Restapi().Account().Extension().Sms().Post(parameters, attachments);

Anyone know the solution to this?

3 Answers
answered on Mar 5, 2021 at 2:06pm  

Thank you, I will give that try :)

answered on Mar 5, 2021 at 2:25pm  

That did it, thank you so much

answered on Mar 5, 2021 at 10:18am  

The tutorial was created using the old .Net SDK.

Using the current SDK, please modify the code as follows

var parameters = new CreateMMSMessage();
parameters.from = new MessageStoreCallerInfoRequest { phoneNumber = fromNumber }; = new MessageStoreCallerInfoRequest[] { new MessageStoreCallerInfoRequest { phoneNumber = RECIPIENT } };
parameters.text = "Hello World from C#";
var attachment = new Attachment { fileName = "test.jpg", contentType = "image/jpeg", bytes = File.ReadAllBytes("test.jpg") };
parameters.attachments = new Attachment[] { attachment };
var resp = await rc.Restapi().Account().Extension().Mms().Post(parameters);


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