Comments (8)
I don't think you are using the official SDK. Because your code seems very strange to me:
var ringCentral = new RingCentral.XDK.ApiClient(appkey, appsecret,defaultendpoint);
Please read the readme file for the sample code: https://github.com/ringcentral/ringcentral-csharp-client
This project is currently in beta, we have another project which is stable: https://github.com/ringcentral/ringcentral-csharp
You code uses neither of the two above, so we cannot provide any more comments.
from ringcentral-csharp-client.
Hello Tyler,
Thanks for the information i am now using the new SDK which you mentioned in the second link but it is giving me an error while login, please check the attachment.
from ringcentral-csharp-client.
Hello Tyler,
Below is the code i use
sdk = new SDK(appKey, appSecret, SDK.Server.Sandbox, "C Sharp Test Suite", "1.0.0");
// mock test only, don't contact remote server
sdk.Platform._client = new HttpClient(new RingCentral.Test.MockHttpClient()) { BaseAddress = new Uri(SDK.SandboxServerUrl) };
sdk.Platform.Login(phoneNumber, "", password, true);
var from = senderPhoneNumber;
var to = recipientPhoneNumber;
var text = "Test SMS message";
var jsonData = "{\"to\": [{\"phoneNumber\": \"" + to + "\"}]," +
"\"from\": {\"phoneNumber\": \"" + from + "\"}," +
"\"text\": \"" + text + "\" }";
Request request = new Request(SmsEndPoint, jsonData);
ApiResponse result = sdk.Platform.Post(request);
JToken token = JObject.Parse(result.Body);
var messageStatus = (string)token.SelectToken("messageStatus");
Thanks,
Shashank.
from ringcentral-csharp-client.
I read your code and you are running sample code from unit tests. These are for mock testing only, not for real world usage.
Please read the doc for sample code: http://ringcentral-csharp.readthedocs.io/en/latest/
from ringcentral-csharp-client.
Hello ,
i used the new code now as mentioned in the above link still it breaks in the same place as the ring central dll is pointing to platform.cs
var sdk = new SDK(appKey, appSecret, SDK.SandboxServerUrl, "Application Name", "Application Version");
// Password Grant Authorization
var response = sdk.Platform.Login(phoneNumber, "", password, true);
var jsonString = "{ \"text\": \"hello sms!\", \"from\": { \"phoneNumber\": \"15188315172\" }, \"to\": [{ \"phoneNumber\": \"19295755445\" }] }";
var request = new Request("/restapi/v1.0/account/~/extension/~/sms", jsonString);
var response1 = sdk.Platform.Post(request);
from ringcentral-csharp-client.
Hello ,
once i commented the below code in the platform.cs inside the SDK then only it worked.
from ringcentral-csharp-client.
Hello Tyler,
Please let me know if commenting the above line is ok as this had apparently made the SMS work.
Can i close the issue?
Thanks,
Shashank.
from ringcentral-csharp-client.
Hi @shashank0764 ,
First of all, this is not the right place for your question. You are talking about https://github.com/ringcentral/ringcentral-csharp which is not the current repository.
Why do you need to change the source code of the SDK? How did you install it? The recommended way is to install it via NuGet. As shown in the readme file of https://github.com/ringcentral/ringcentral-csharp
Install-Package RingCentralSDK
Last but not least. could you please post the full stack trace of the exception? And from your first screenshot, there was a NullReferenceExcepotion, could you please tell me which object is null?
from ringcentral-csharp-client.
Related Issues (20)
- Incoming notification HOT 1
- Get caller name using DetailedTelephonyState event filter. HOT 2
- .Net Core Webhosting not able to find the referenced package assemblies Micorsoft.AspNetCore HOT 1
- REST API which should support multi target framework(.net 472 and .net core) HOT 1
- Make header info available? HOT 2
- QUESTION: Subscription: Message Store HOT 2
- How about a complete example in C# HOT 3
- Running in console app HOT 2
- Missing FaxPath.PostParameters HOT 2
- Create subscription after token refreshed HOT 1
- Access Token expires HOT 1
- Add documentation for Auth Code HOT 1
- POST Bulk Assign for Call Queues Pointing to GLIP and not Call Queues Object HOT 7
- Cross platform targeting HOT 1
- Signed/StrongNamed version? HOT 1
- Not able to generate access tokens after Authorization HOT 1
- rc.Authorize hangs up
- Add Support for Call Log Sync - Account level HOT 1
- 3 legged Authorization
- Obsolete reference to Microsoft.AspNet.WebApi.Client
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ringcentral-csharp-client.