I'm able to successfully create a new subscription using the Java SDK, but when the subscription attempts to refresh itself it's failing with a 401 error. Either there is a bug with the Java SDK or I'm missing something.
When the subscription is created, it starts a timer to regularly refresh itself:
Bug when this code runs:
This error results:
com.ringcentral.RestException: HTTP status code: 401
{
"errorCode" : "TokenInvalid",
"message" : "Token not found",
"errors" : [ {
"errorCode" : "OAU-213",
"message" : "Token not found"
} ]
}
at com.ringcentral.RestClient.request(RestClient.java:152)
at com.ringcentral.HttpClient.put(HttpClient.java:43)
at com.ringcentral.HttpClient.put(HttpClient.java:77)
at com.ringcentral.Subscription.refresh(Subscription.java:115)
at com.ringcentral.Subscription$2.run(Subscription.java:94)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Am I doing something wrong or is this an issue with the SDK?