Pigeon Multiple FCM keys

Hi all,

I am using Pigeon library to manage mobile push notifications until now I’ve only had the need of having one fcm/apns key in config like shown below, I am looking to add a second key for fcm how would that be possible. I have looked around not seen anything clear on this scenario.

config :pigeon,
       apns_default: %{
         cert: System.get_env("APNS_CERT"),
         key: System.get_env("APNS_KEY"),
         mode: :dev
config :pigeon,
       fcm_default: %{
         key: System.get_env("FCM_KEY")

Any help/suggestion is welcome.

Many thanks in advance.

Does this answers to your question?


Hey. Can you tell me what is registration id when you’re sending the message like this

 msg = %{"body" => "your message"}
 n = Pigeon.FCM.Notification.new("your device registration ID", msg)

Is it the same as sender id ?


The registration ID is the token created by the device, i.e the receiving device.

How do I get that token? I’m connected to real android device

Your android app should send the token to the server for storage. Once stored you can use it to send notifications to device.

1 Like

This isn’t generated on elixir app, its on your android app.

check this guide: http://lessons.livecode.com/m/4069/l/59312-how-do-i-use-push-notifications-with-android

1 Like

Yeah I solved it. I didn’t know this concept. Just read it.

I was using flutter so here it’s given how you can send the token

I believe it would be more appropriate to post for help on a flutter forum.