Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorize returns Faulted Status #32

Closed
shridharjjoshi86 opened this issue May 4, 2018 · 1 comment
Closed

Authorize returns Faulted Status #32

shridharjjoshi86 opened this issue May 4, 2018 · 1 comment

Comments

@shridharjjoshi86
Copy link

shridharjjoshi86 commented May 4, 2018

Hi
I am trying get RingCentral notification for incoming call in real time.
I am using VS2013 Express with .net framework 4.5.2

I am not able to get authorize token it always return faulted status
Below is my code snippets

private void button1_Click(object sender, EventArgs e)
       {
        

           //rc = new RestClient(txtClientID.Text, txtClientSecrete.Text, !chkIsSandBox.Checked);
           rc = new RestClient(txtClientID.Text, txtClientSecrete.Text);
           Task<TokenInfo> tokenInfo = Authorize();
           
           RegisterSubscription();
          

       }

       async void RegisterSubscription()
       {
           var subscription = rc.Restapi().Subscription().New();

           //subscription.EventFilters.Add("/restapi/v1.0/account/~/extension/~/message-store");

           subscription.EventFilters.Add("/restapi/v1.0/account/~/extension/~/presence");

           subscription.PresenceEvent += subscription_PresenceEvent;

           await subscription.Register();
       }

       void subscription_PresenceEvent(object sender, SubscriptionEventArgs e)
       {
           rtLog.Text += e.Message;
       }
       private async Task<TokenInfo> Authorize()
       {
           rc.AutoRefreshToken = true;
           return await rc.Authorize(txtUsrName.Text, txtExtension.Text, txtPWD.Text);

       }

Error image
image

Thanks in advance.

@shridharjjoshi86
Copy link
Author

shridharjjoshi86 commented May 7, 2018

HI,

I was able to resolve this by adding assembly to the GAC using Gacutil.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant