Getting error 404 and { "errorCode" : "CMN-102", "message" : "Resource for parameter [subscriptionId] is not found", "errors" : [ { "errorCode" : "CMN-102", "message" : "Resource for parameter [subscriptionId] is not found", "parameterName" : "subscriptionId" } ], "parameterName" : "subscriptionId" }
when trying to refresh subscription passing valid subscription id to ringcentral.com/restapi/v1.0/subscription/ and using PUT.
We refresh subscriptions every day around 1am PST for all Ringcentral accounts logged in our app. Usually works fine for 7-10 days, then failing with above error for all subscriptions.
What could be the reason for that?
Do you have an ability to look at your logs to see what was reason subscription was not found (but existed a day prior to that)? We have detailed trace on out side including all ids, etc.
While web hook subscriptions expire in days we refresh them every night. Here is what we typically get on refresh with 200 http return:
{
"uri" : "https://platform.ringcentral.com/restapi/v1.0/subscription/589f16dc-7cc1-40fb-941d-4cbd395988e6";,
"id" : "589f16dc-7cc1-40fb-941d-4cbd395988e6",
"creationTime" : "2016-11-16T20:10:42.772Z",
"status" : "Active",
"eventFilters" : [ "/restapi/v1.0/account/244166027/extension/462615027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299450027/message-store", "/restapi/v1.0/account/244166027/extension/462613027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/302041027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/462613027/message-store", "/restapi/v1.0/account/244166027/extension/462615027/message-store", "/restapi/v1.0/account/244166027/extension/244166027/message-store", "/restapi/v1.0/account/244166027/extension/302041027/message-store", "/restapi/v1.0/account/244166027/extension/299451027/message-store", "/restapi/v1.0/account/244166027/extension/299450027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299451027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/244166027/presence/line/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/244166027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299452027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299452027/message-store" ],
"expirationTime" : "2017-03-17T07:00:08.877Z",
"expiresIn" : 604799,
"deliveryMode" : {
"transportType" : "WebHook",
"encryption" : false,
"address" : "https://url-was-modified/rc2/subscription.php?guid=60A0C223-0889-47DA-82AA-568C37310B4E";
}
}
Next day
{
"uri" : "https://platform.ringcentral.com/restapi/v1.0/subscription/589f16dc-7cc1-40fb-941d-4cbd395988e6";,
"id" : "589f16dc-7cc1-40fb-941d-4cbd395988e6",
"creationTime" : "2016-11-16T20:10:42.772Z",
"status" : "Active",
"eventFilters" : [ "/restapi/v1.0/account/244166027/extension/462615027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299450027/message-store", "/restapi/v1.0/account/244166027/extension/462613027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/302041027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/462613027/message-store", "/restapi/v1.0/account/244166027/extension/462615027/message-store", "/restapi/v1.0/account/244166027/extension/244166027/message-store", "/restapi/v1.0/account/244166027/extension/302041027/message-store", "/restapi/v1.0/account/244166027/extension/299451027/message-store", "/restapi/v1.0/account/244166027/extension/299450027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299451027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/244166027/presence/line/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/244166027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299452027/presence?detailedTelephonyState=true", "/restapi/v1.0/account/244166027/extension/299452027/message-store" ],
"expirationTime" : "2017-03-18T07:00:10.881Z",
"expiresIn" : 604799,
"deliveryMode" : {
"transportType" : "WebHook",
"encryption" : false,
"address" : "https://url-was-modified/rc2/subscription.php?guid=60A0C223-0889-47DA-82AA-568C37310B4E";
}
}
You can see that expiration time is bumped by 1 day.
In seven days (not sure about exact number but close) we got 404 with subscriptionId not found as if it already expired. Query subscription for an account returns nothing.
One way to explain all of this is to assume that subscription is not refreshed despite 200 returned.
Another thing i noticed is
"creationTime" : "2016-11-16T20:10:42.772Z",
I am not sure what exactly this time represents since this subscription was recreated several times already
Need your help badly since we are in production
1) Are you talking about WebHook subscriptions? PubNub ones live for 15 minutes and should be renewed with such frequency.
2) Are you referring Sandbox or Production
3) Please provide your application ID from Dev Portal.
I have a workaround: catch the 404 exception during refresh and resubscribe.
Sample code in C#: https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral/SubscriptionService...
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder