question

z-admin2902 avatar image
z-admin2902 asked benjamin-dean answered

SMS is sending 2 times through API

SMS was sending 2 times from the sandbox account, it was working fine till yesterday. When i checked the request from the integration it sends only one time but the API is sending the SMS twice to the phone number.

sdk
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
This is the only report of this which we have received. I just tested this many times successfully, and I also tested this with one of our other developer relations engineers in his sandbox account, he also only ever receives a single SMS message.

Could you provide the code you are using to send the SMS message via the API please?
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

z-admin2902 avatar image
z-admin2902 answered
Hello Team,

I was doing some more tests and the issue persists, i am sending only one but receiving 2 sms messages after an interval of around 5-7 minutes containing the same text. i have verified my code and it executes only time and after that i quit my application.  I am using c# SDK.
this was sending only one sms some days back but i am not sure why it is seding multiple sms now. please check
////ring central code starts                     
                    var ringCentral = new RingCentral.XDK.ApiClient(appkey, appsecret,defaultendpoint);

                    //Login
                    ringCentral.Login(userphonenumber, password);

                    //Sending SMS
                    ringCentral.SMS.Send(fromnumber, phonenumber, msgcontent);
                   
                    szResponseString = ringCentral.res;
                    
                    var obj = JObject.Parse(szResponseString);
                    string statusresp = (string)obj.SelectToken(ConfigurationManager.AppSettings["messagestatuskey"]);
                    string messageid = (string)obj.SelectToken(ConfigurationManager.AppSettings["messageidkey"]);



1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
Thanks for sharing your code. I've tested (as have several other members of the team) this repeatedly since you've reported it, and I (we) only ever receive a single SMS (of course I am not using the C# Client). Here are some steps you can follow to help isolate this issue better so we can determine the cause of your mysterious duplicate SMS messages.
  1. Use the RingCentral API Explorer to test sending an SMS message. Make sure to use the exact same API keys and user credentials from your sandbox account as what you have used to first obtain a valid access_token using the API Explorer. The API Explorer will cache the access_token until it expires which allows you to test sending an SMS message. Please be certain that when you send the SMS, the POST body you use matches identically to the values you are using for each property in your C# code.

  2. If after sending an SMS successfully using the API Explorer and following the prescribed directions precisely you receive only a single SMS message, this helps isolate the issue you are experiencing to either your implementation code or the C# SDK. I would recommend creating an issue in the RingCentral C# SDK issue tracker on Github. Make sure to provide a link back to this community post as well as providing any other useful information such as which version of the C# SDK you are using and pertinent environment variables.

  3. However, if you still receive a duplicate SMS message, this indicates to me this could be an account-level setting in your RingCentral account or that you might have a 3rd party service such as Zapier configured to send a duplicate message. In this case, I would recommend first making sure you do not have any 3rd party services set to act as a relay for your SMS messages, and if you discover any...retest your code and see if this resolves the issue.

  4. If you do not discover (or know for certain you do not have any 3rd party services configured to operate with your account or extension), then I would recommend investigating the settings in your sandbox account to be certain nothing is configured to relay/duplicate/backup/send this additional SMS.

  5. If you do not locate, or are unable to find any "smoking gun" in your sandbox account, I would recommend you create a developer support case to get some help resolving this issue. Should you however locate a possible cause in your account configuration, I would revert that setting and retry your C# code to see if this resolves the issue.
I'm very interested in learning what the cause of this issue is and how this turns out, so please keep us informed.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

z-admin2902 avatar image
z-admin2902 answered
thanks for the answer, i tried api explorer to send out the sms . It worked fine and has sent the sms only once. as a next step do still need to check the account level setting or i need to post this issue in c#  SDK forum.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

benjamin-dean avatar image
benjamin-dean answered
You should not need to continue isolating the issue, your results clearly identify this issue as residing within one of two locations:

1. Your application code
2. The SDK which your application code uses

I would continue to Step #2 outlined above: If after sending an SMS successfully using the API Explorer and following the prescribed directions precisely you receive only a single SMS message, this helps isolate the issue you are experiencing to either your implementation code or the C# SDK. I would recommend creating an issue in the RingCentral C# SDK issue tracker on Github. Make sure to provide a link back to this community post as well as providing any other useful information such as which version of the C# SDK you are using and pertinent environment variables.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys