question

rick-smith2386 avatar image
rick-smith2386 asked Tyler Liu commented

How do I call C# RingCentral Client Authoirze() method?

Need info on Calling RingCentral C# Authorize Method? There seems to be little or no documentation on this thing I'm trying this:

public async void MyLogin()

{


await myClient.Authorize("+1XXXXXXXXX", "", "password");

}

This is no good of course it needs to return something but what? Please guys need more documentation!!!!


Thanks



getting started
1 |3000

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

Tyler Liu avatar image
Tyler Liu answered
It does return something which you can inspect that method's return type if you use Visual Studio.

And the returned thing is not important if you just want to invoke some API call. As long as the authorize doesn't throw exception, you are authorized and you can go ahead to make API calls.

If there are exception, you can catch it and print the response:  https://github.com/ringcentral/ringcentral-csharp-client#exception-handling
1 |3000

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

rick-smith2386 avatar image
rick-smith2386 answered Tyler Liu commented
Ok I got it figured out sort of; now it wants netstandard added. Did this within csproj but no go, it still doesnt like Authorize.

Sheesh...Lots of problems!!!
4 comments
1 |3000

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

Tyler Liu avatar image Tyler Liu ♦ commented ·
Hi Rick,

months ago I created a short video for authorization and fax sending using C# SDK:  https://www.youtube.com/watch?v=lECKMrX_Dgw&t=13s

I hope it helps.
0 Likes 0 ·
rick-smith2386 avatar image rick-smith2386 commented ·
Tyler;

Thanks for the info, I got over that hurdle it appears to want Net framework 4.6.2 instead of 4.6.1 change that and it now accepts Authorize.

Unfortunately I kill one bug and another 1 shows up for the funeral :{

var response = await extension.Sms().Post(requestBody);

This throws extension does not exist in the current context. Has this been deprecated?
Im using the code from here https://github.com/ringcentral/ringcentral-csharp-client

Thanks Again!


0 Likes 0 ·
rick-smith2386 avatar image rick-smith2386 commented ·
Just as an experiment I tried
    //var response = await extension.Sms().Post(requestBody);
            //var response = await ExtentionPath.Sms().post(requestBody);
            //var response = await SmsPath()
            //var response = await rc.PostContent(Endpoint(false), requestBody);
            //var response = await rc.PutContent(endpoint(false), requestBody);
            //var response = await rc.Post(endpoint(false), requestBody);
            //var response = await rc.Post(endpoint(true), requestBody);
            //var response = rc.Post(endpoint(false), requestBody);
none of them work Endpoint or endpoint does not exist in the current context...I think it belongs to PathSegement? but how do I set it up?

Need documentation!!!!

0 Likes 0 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
Rick, I totally agree with you that we need more documentation.

For now, if you want to find code which works, please refer to the test cases:  https://github.com/ringcentral/ringcentral-csharp-client/tree/master/RingCentral.Test

For sms sending:  https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/SubscripotionT...

0 Likes 0 ·

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