question

rick-smith avatar image
rick-smith asked ·

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
       

topic-default
1 |1000 characters needed characters left characters exceeded

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
Share
1 |1000 characters needed characters left characters exceeded

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

rick-smith avatar image
rick-smith answered ·
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 Share
1 |1000 characters needed characters left characters exceeded

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

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 · ·
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 · ·
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 · ·
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 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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