News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Unable to refresh subscription. error 404 and "errorCode" : "CMN-102"
Tags: rest api
Mar 23, 2017 at 7:43pm   •   3 replies  •  0 likes
alec-dfour

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.

3 Answers
answered on Mar 24, 2017 at 8:41am  
This is a web hook subscription; Application is in production. Not sure what is application ID. Application Key is c7qfJNYFRcGojljw2tvwWA 


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




 0
answered on Mar 24, 2017 at 2:14am  
Hi Alec,  can you clarify please.

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.

 0
answered on Mar 23, 2017 at 11:09pm  
This does happen, sometimes.

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...


 0



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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us