Skip to main content
The First Step
January 7, 2021
Question

CS0103 exception when trying to send SMS

Trying this code to send SMS in C# it is throwing a CS0103 at this point:

var response = await extension.Sms().Post(requestBody); //name extension does not exist in current context.


The full code
public async void sendSms()
{
RestClient rc;
rc = new RestClient("id, "clientsecret", "https://platform.devtest.ringcentral.com");
var requestBody = new
{
text = "Test",
from = new { textFrom = "+15551212" },
to = new object[] { new { sendTo = "+15551231" } }
};
var response = await extension.Sms().Post(requestBody); //Can't get past this point.
}





11 replies

PhongVu
Community Manager
Community Manager
January 8, 2021

Once you could try Python code, can you use this Python code?

https://developers.ringcentral.com/guide/messaging/quick-start#python