2

The URL https://fcm.googleapis.com/fcm/send is for production, I want to know the endpoint for test environment as I want test and production to point to different remote systems. What is the URL for test?

On this page https://firebase.google.com/docs/cloud-messaging/http-server-ref

there's no mention of any URLs for test environment.

  • 2
    There is no test environment, you have to use a different project + google_services.json + server api keys for testing – Tim Jan 16 '19 at 10:04

2 Answers2

3

You can send push notification using postman REST api by sending to the url:

https://fcm.googleapis.com/fcm/send
Method: POST

don't forget to add inside the header:

Authorization:key=yourServerKeyFromFirebaseTestEnvironment
Content-Type:application/json

And when you need to send to your test environment, you need to create a firebase test environment and use its server key

Khalid Taha
  • 3,183
  • 5
  • 27
  • 43
0

Firebase does not provide test environments, you can create a new app in existing project and use API key of that app for testing.

Tim
  • 41,901
  • 18
  • 127
  • 145
Dewashish
  • 141
  • 1
  • 7