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
C# Sending SMS thows System.UriFormatException: 'Invalid URI: The format of the URI could not be determined.'
Tags: sdk
Oct 3, 2018 at 8:01am   •   2 replies  •  0 likes
rick-smith

Trying to send a simple SMS with this code it throws

public void SendText()

{


//This throws System.UriFormatException: 'Invalid URI: The format of the URI could not //be determined.' at this point

var sdk = new SDK(appkey, appSecret, "SDK.Server.Sandbox", " MyApp", "1.0.0");

var jsonString = "{ \"text\": \"TryThis RC!\", \"from\": { \"phoneNumber\": \"+15558881212\" }, \"to\": [{ \"phoneNumber\": \"+18008675309\" }] }";

var request = new Request("/restapi/v1.0/account/~/extension/~/sms", jsonString);

var response = sdk.Platform.Post(request);


}


What am I doing wrong?





2 Answers
answered on Oct 3, 2018 at 6:28pm  
Hi Rick,

Last month I created a video for how to setup a new project. Please watch this: https://www.youtube.com/watch?v=lECKMrX_Dgw&t=10s

 1
answered on Oct 3, 2018 at 8:40am  
Hi Rick,

Not sure what SDK do you use. Please refer to our official SDK for C-Sharp and use it to access RingCentral Platform. Have a look at the sample code for sending SMS

Hope this helps,
+ Phong 

 1



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