We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
GuidesPush KitAndroidOther CapabilitiesMessage Cache Time for Offline Users

Message Cache Time for Offline Users

A user device cannot receive messages if it gets disconnected from the Internet. In this case, you can use the ttl field provided by the Push Kit server API for message cache on the server. If the user device gets connected to the Internet within the message cache time, the cached messages will be sent. Otherwise, the messages will be discarded.

Message body example:

Collapse
Word wrap
Dark theme
Copy code
  1. {
  2. "validate_only": false,
  3. "message": {
  4. "notification": {
  5. "title": "message title ",
  6. "body": "message body"
  7. },
  8. "android": {
  9. "notification": {
  10. "click_action": {
  11. "type": 2,
  12. "url": "https://example.com"
  13. }
  14. },
  15. "ttl": "1000"
  16. },
  17. "token": [
  18. "pushtoken1"
  19. ]
  20. }
  21. }