使用 pyfcm 的移动网络应用程序 Android 和 iOS 的设备注册 ID

Device Registration Id for Android and iOS for mobile web application using pyfcm

我是推送通知的新手。我正在尝试使用 pyfcm 发送推送通知。几个问题:

  1. Registration_ids:我不确定如何通过 pyfcm 获取 iOS 和 Android 的 "registration_ids"。
  2. 它是否与实例 ID 令牌相同?
  3. 对于设备来说它总是相同的还是在应用程序和设备之间是特定的?

1. Registration_ids: I am not sure how to get the "registration_ids" for iOS and Android through pyfcm.

Registration ID/Tokens 只能在您的客户端应用程序端生成 (Android/iOS)。

查看如何设置 Android 客户端 here, iOS Client here, and JavaScript Client here

2. Also, is it same as the instance id token?

AFAIK,这也是有时用于注册令牌的术语。由于它来自 InstanceID,因此注册令牌来自。

3. Is it always same for a device or is it specific between an app and device?

每个令牌对于每个应用程序实例(即设备)都是唯一的。参考我在#1 中链接的注册令牌文档:

An ID generated by the FCM SDK for each client app instance. Required for single device and device group messaging. Note that registration tokens must be kept secret.