Question

Tryin to send my first API SMS message, getting Status = Faulted {7}

  • 21 October 2022
  • 3 replies
  • 351 views

I am new to RingCentral, building a AtoP SMS feature.

I am using .NET Core. Downloaded the sample.
It compiles all fine. Plugged in the credentials.

When I go to sent I get

Id = 31, Status = Faulted {7}, Method = "{null}", Result = "{Not yet computed}"


What is faulted {7}. Is that a credential issue?


Thanks


3 replies

Userlevel 1

That does not say anything. Share some code (remove sensitive info if any) how you call the API.

Thanks for your help.

I was just trying to understand what "faulted {7} meant.


However, here is the code I am trying to get working (replaced passwords etc)


protected void Page_Load(object sender, System.EventArgs e)
{
string accountSid = "AAA";
string authToken = "BBB";
string extension = "101";
string username = "CCC";
string userpwd = "DDD";

RingCentral.RestClient RC = new RingCentral.RestClient(accountSid, authToken, false);
RC.Authorize(username, extension, userpwd);


var parameters = new CreateSMSMessage();

parameters.to = new MessageStoreCallerInfoRequest[] {
new MessageStoreCallerInfoRequest()
{
phoneNumber = "+1949381XXXX"
}
};


parameters.to = new MessageStoreCallerInfoRequest[] {
new MessageStoreCallerInfoRequest()
{
phoneNumber = "+1760802XXXX"
}
};

parameters.text = "test";

var message = RC.Restapi().Account(accountSid).Extension(extension).Sms().Post(parameters);
}



Userlevel 1

Where did you get the example code from? The code you posted looks very strange and I suspect that the account id and the extension id is completely wrong.

string accountSid = "AAA";
string extension = "101";

Where did you get the account Sid? Remember that the accountId and the extensionId are internal ids. They are NOT the username and the extension number (101 as you currently specified).

If you are not sure about the ids, leave them blank

var message = RC.Restapi().Account().Extension().Sms().Post(parameters);

Reply