AdaLollA
AdaLollA

Reputation: 371

Firebase Cloud Messaging: REST API responds with "INVALID_KEY"

Our push notifications work fine with the in-built tester on the firebase console website.

However when we try to use Postman to simulate a push request to fire off "our own" notification the server always returns "INVALID_KEY" Error 401.

Where is the correct Key located? So far we tested:

firebase console settings

When using these keys in Postman (plus the required body) the previosly mentioned error is returned:

postman setup

What are we doing wrong? Do we need a completely different key? Thanks in advance!

Upvotes: 2

Views: 5310

Answers (1)

AdaLollA
AdaLollA

Reputation: 371

Found the solution: you have to create a Legacy Setup of the Cloud Messaging API under Project Settings > Cloud Messaging.

To do so press the three dots next to "Cloud Messaging API (Legacy)" and enable the service. It then automatically sets up the environment and present the key.

Upvotes: 12

Related Questions