question

mangarao avatar image
mangarao asked Phong Vu answered

revoke subscription not working for websocket

Hi,

I am using websocket (ringcentral-websocket-0.2.0.jar) and invoking revoke method in subscription to unsubscribe but it throws null pointer exception at line subscription.revoke() . Can you suggest me how to fix this issue or how to unsubscribe current websocket subscription when customer deauthorizes access


our code:

Subscription subscription = new Subscription(setUpRestClient(account), eventFilters, this::eventConsumer);
subscription.revoke();

webhooks
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

I don't know what you put in the setUpRestClient(account) function and how it create and authenticate the SDK instance. But first make sure that the subscription is created and working. Then test the revoke. It works well in my test so I am sure that the problem is somewhere in your code.

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