Skip to content

Instantly share code, notes, and snippets.

@gugadev
Created January 25, 2022 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugadev/60e0bd71719af8649ad58b3b8f68097d to your computer and use it in GitHub Desktop.
Save gugadev/60e0bd71719af8649ad58b3b8f68097d to your computer and use it in GitHub Desktop.
Migration of the REST payload from legacy to v1 - FCM
{
"to": "token o topic",
"priority": "high",
"notification": {
"title": "Title of the notification",
"body": "Description of the notification",
"android_channel_id": "Android channel"
},
"data": {
"field_1": "Some extra data"
}
}
{
"message": {
"token": "token", // or "topic" if we want to send for a topic
"notification": {
"title": "Title of the notification",
"body": "Description of the notification"
},
"android": {
"priority": "high",
"notification": {
"channel_id": "Android channel"
}
},
"data": {
"field_1": "Some extra data"
}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment