Prerequisites
Implement the SDK of your choice in your project
FCM_TOKEN (expand for instructions)
PROJECT_NUMBER (expand for instructions)
PRIVATE_TOKEN (expand for instructions)
Step 1
Copy the CURL
curl --request POST \\
--url <https://fcm.googleapis.com/v1/projects/{PROJECT_NUMBER}/messages:send> \\
--header 'Authorization: Bearer {PRIVATE_TOKEN}' \\
--header 'Content-Type: application/json; UTF-8' \\
--data '{
"message": {
"token": "{FCM_TOKEN}",
"data": {
"title": "Test Data Message",
"message_body": "This is a test data message",
"customKey1": "value1",
"customKey2": "value2"
}
}
}'
⚠ Remember to change the creds marked between curly braces
Step 2
Step 3
Paste the CURL into Insomnia or Postman and send it