Expo push notification with firebase cloud function



I need to send push notification with expo and firebase clouud function because of I m using firebase database.
it will triggered and send push when there is any update on firebase database. is there any solution for this issue???

firebase cloud function is not support (async functions) so ı could not use the “await …” type for exponent-server-sdk. how can I handle it?

Thank you…

1 Like

is there anybody to answer and be hero:))

1 Like

you could use OneSignal and call it from firebase function

btw cloud functions was down the past day. It’s back up now


How can I use onesignal with expoPushToken? or should I use only onesignal??


Sorry i’m using OneSignal because we ejected/detached so we couldn’t use expo push tokens.
I never implemented expo push token…


Don’t think you can do that.

I had this same question last week and decided to detach from Expo for the sake of FCM.

1 Like


did you handle it? is there any problem on detaching from expo?


@suatozkan While firebase cloud messaging cannot be used in the regular expo configuration without detaching, I believe that firebase cloud functions are possible. Would using await + fetch work, perhaps as described in this medium article here: https://medium.com/step-up-labs/our-experience-with-cloud-functions-for-firebase-d206448a8850 ?

There have also been accounts of Expo users getting firebase cloud functions working in this thread here: Expo and uploading image Blobs?

1 Like

I use ZetPush https://zetpush.com/ for web notifications. Is very easy to use.


I’m interested in a solution to this as well. It seems like I should be able to just write a cloud function that uses the ExpoClient described in their node documentation however when I try to do that, it doesn’t seem to work. Perhaps it’s because I’m not installing the expo-client-sdk correctly? I’m still new to firebase so if that’s the case, I’ll need another solution to handle push notifications.


Hey @fourcolors,

Are you on a paid plan for Firebase? The free plan only allows for outbound network requests to Google-owned services. In order to use the expo node server, you’ll have to be on a paid plan.




So it looks like my issue was I was importing is incorrectly. I was following the import syntax for the docs but that didn’t work on firebase, I had to do something like import * as Expo from 'expo-server-sdk'


Legend! I was having the same issue. I think this will help a lot of people.

1 Like

I’ve got a tutorial on using cloud functions with expo push notifications. : https://www.youtube.com/watch?v=R2D6J10fhA4&t=1s
Hope it helps!


I used your tutorial and everything works. but i keep getting this error in the cloud function. its firing off and im getting the data etc. but its not doing the route correctly.


Is this perhaps because you haven’t switched to the Blaze plan to support outbound requests?