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
subscription expiry with PubNub transport
Tags: rest api
Jul 19, 2021 at 11:26am   •   1 replies  •  0 likes
Greg Rossi
The API reference for /subscription states that expiresIn has a max value of 7 days (greater for webhooks). However, if I attempt to create a subscription with a one-hour lifetime, a 15-minute subscription is created. Is there a different undocumented expiresIn maximum for PubNub?

Request:
curl --request POST \
  --url https://platform.ringcentral.com/restapi/v1.0/subscription \
  --header 'accept: application/json' \
  --header 'authorization: Bearer ... \
  --header 'content-type: application/json' \
  --data '{"deliveryMode":{"transportType":"PubNub"},"eventFilters":["/restapi/v1.0/account/~/telephony/sessions"],"expiresIn":3600}'

Response:

{
  "uri": "https://platform.ringcentral.com/restapi/v1.0/subscription/5c2a73a6-4320-4a3f-ac3d-a9c7b86f10dc",
  "id": "5c2a73a6-4320-4a3f-ac3d-a9c7b86f10dc",
  "creationTime": "2021-07-19T18:07:21.411Z",
  "status": "Active",
  "eventFilters": [
    "/restapi/v1.0/account/66958521/telephony/sessions"
  ],
  "expirationTime": "2021-07-19T18:22:21.411Z",
  "expiresIn": 899,
  "deliveryMode": {
    "transportType": "PubNub",
    "encryption": false,
    "address": "474144630900267_cXXXXXXX",
    "subscriberKey": "sub-c-b8b9cd8c-e906-11e2-b383-02ee2XXXXXXX"
  }
}

Is it possible to create a subscription with a longer expiry, e.g., up to 24 hours? A 15 minute maximum makes it nearly impossible to guard against data loss during ordinary system downtime/maintenance.

1 Answer
answered on Jul 19, 2021 at 1:30pm  

PubNub notification expires after 15 mins. That is the maximum value. You must implement a timer to renew the subscription before it expires.

https://developers.ringcentral.com/api-reference/Subscriptions/renewSubscription


 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