I'm using the RingCentral.net SDK. I use basically this code to monitor for my extension's calls:
=================
string s1 = "/restapi/v1.0/account/{0}/extension/~/presence?detailedTelephonyState=true&sipData=true";
string s2 = "/restapi/v1.0/account/{0}/telephony/sessions";
// replace the IDs in the above strings (not shown)
await restClient.PubNubExtension.Subscribe(new[] {s1, s2}, Device.ParseSubscription);
=================
After an hour the token for the RestClient needs renewing, so I renew this with:
await restClient.Refresh().ConfigureAwait(false);
Is there some best practice on how to use long lasting subscriptions? I'll happily share the non-working code that I'm doing, but I'm pretty sure it's wrong so I'd like to understand how to do it properly.