简体   繁体   中英

How to get registration token for FCM push notification for Android?

I am building an push notification service using https://github.com/geeknam/python-gcm

this requires an API_KEY and Registation ID of device to send message.

I have created an app on console.developers.google.com and have got the API_KEY. Now i have no clue how to get the Registration ID.

Are there dummy app(s) on installation of which it will return registration ID or something like that ?

I have created an app on console.developers.google.com and have got the API_KEY.

You'll only be able to get a valid Server Key when you create a project in Firebase Console . API Keys (recently) generated in the Developer's Console would not work for GCM (and FCM). From the note in the docs (under Server Key) :

Starting from September 2016, you can create new server keys only in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.


Are there dummy app(s) on installation of which it will return registration ID or something like that?

You'll have to create your own dummy app where you'll have to call the getToken() to generate a Registration token (aka Registration ID). See the FCM Quickstart in GitHub .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM