Skip to main content
Question

revoke subscription not working for websocket

  • December 17, 2023
  • 1 reply
  • 149 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

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • December 18, 2023

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.