Step 1:
Go to https://developers.google.com/oauthplayground/
- Select the Authorize API, and after that, fill the ”input your own scopes (email, https://www.googleapis.com/auth/firebase.messaging)”. Once it is completed, and the Client ID and Client Secret Key are displayed for the
refresh_token
.
Step 2:
POST => https://developers.google.com/oauthplayground/refreshAccessToken
With the following body:
{"token_uri":"https://oauth2.googleapis.com/token","refresh_token":"1//04BZzVDcaVl4vCgYIARAAGAQSNwF-L9IrPUzn_0****"}
Step 3:
POST =>> https://fcm.googleapis.com/v1/projects/chat-2dc2d/messages:send
Headers:
Bearer Y29**********.......
And in the body:
{
"message": {
"token": "*********",
"notification": {
"title": "Sample",
"body": "Sample"
}
}
}