8000 Merge commit '94e4874faf5106ecb106d6fd31362f5f6d5f48f2' into HEAD · Dottenpixel/quickstart-js@f5ea1f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5ea1f1

Browse files
author
devrel-build
committed
Merge commit '94e4874faf5106ecb106d6fd31362f5f6d5f48f2' into HEAD
2 parents 5e49981 + 94e4874 commit f5ea1f1

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)
0