Question

revoke subscription not working for websocket

  • 17 December 2023
  • 1 reply
  • 123 views

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();


1 reply

Userlevel 1

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.

Reply