2

When the user subscribes for Web Push Notifications I get the subscription data that contains an endpoint and keys (auth & p256dh).

Then, I can send the subscription data to the Instance ID API and get a FCM Token ID. This way I can send notifications by groups and without worrying about encryption.

But I've noticed that there is an API to refresh the token ID. So, Why and when I should refresh that FCM token?

RockoDev
  • 525
  • 8
  • 18
  • 2
    i think general answer applies http://stackoverflow.com/questions/7030694/why-do-access-tokens-expire – Oleg Bogdanov Jan 04 '17 at 17:29
  • 1
    @OlegBogdanov No. This is not related to OAuth. It's about Firebase Cloud Messaging **Token ID** or **Registration ID** used to send notifications to a specific device/browser/app. – RockoDev Jan 04 '17 at 17:37
  • I know, it was a reference to 'why should one refresh any token...' – Oleg Bogdanov Jan 04 '17 at 17:39
  • @OlegBogdanov Ok, thank you. I think FCM refreshes a token every X time. So, I suppose this API just allows to make it sooner if needed. – RockoDev Jan 04 '17 at 17:57

0 Answers0