8000 Add Firebase console settings link · sengbh/quickstart-js@94e4874 · GitHub
[go: up one dir, main page]

Skip to content

Commit 94e4874

Browse files
committed
Add Firebase console settings link
1 parent 9df2df5 commit 94e4874

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

messaging/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Getting Started
2525
notifications to the browser.
2626
5. Use the generated Instance ID token to send an HTTP request to FCM that
2727
delivers the message to the web application, inserting appropriate values
28-
for YOUR-SERVER-KEY and YOUR-IID-TOKEN.
28+
for [YOUR-SERVER-KEY](https://console.firebase.google.com/project/_/settings/cloudmessaging)
29+
and YOUR-IID-TOKEN.
30+
2931
### HTTP
3032
```
3133
POST /fcm/send HTTP/1.1
@@ -43,6 +45,7 @@ Content-Type: application/json
4345
"to": "YOUR-IID-TOKEN"
4446
}
4547
```
48+
4649
### cURL
4750
```
4851
curl -X POST -H "Authorization: key=YOUR-SERVER-KEY" -H "Content-Type: application/json" -d '{
@@ -55,6 +58,7 @@ curl -X POST -H "Authorization: key=YOUR-SERVER-KEY" -H "Content-Type: applicati
5558
"to": "YOUR-IID-TOKEN"
5659
}' "https://fcm.googleapis.com/fcm/send"
5760
```
61+
5862
- When the app has the browser focus , the received message is handled through
5963
the `onMessage` callback in index.html. When the app does not have browser
6064
focus then the `setBackgroundMessageHandler` callback in firebase-messaging-sw.js

0 commit comments

Comments
 (0)
29DC
0