What is the maximum length of an FCM registration ID token?

后端 未结 3 1758
南笙
南笙 2020-11-30 05:40

Working with the \"new\" Firebase Cloud Messaging, I would like to reliably save client device registration_id tokens to the local server database so that the s

3条回答
  •  误落风尘
    2020-11-30 06:22

    I don't think the upper limit for a registration ID is 4K. It should be safe to assume that it is much lower than that.

    The upper limit for a notification payload is 4KB (link), and the notification payload includes the token (link). Since the payload also needs to include the title, body, and other data too, the registration ID should be small.

    That's what I understand from the docs ¯\_(ツ)_/¯

    The last tokens I got were 163-chars long. I think it's safe to assume that they will never exceed 255 chars.

提交回复
热议问题