FireBase Cloud Messaging sends click_action

Does anyone know one way to send click_action from a firebase console?

I just want to send the click_action button to use the notification, even if the application is closed or in the background.

0
source share
1 answer

There is currently no way to set the click_action parameter when using the Firebase notification console to send a message.

You will need to create a payload on your own application server or use the Postman commands ( here ) or cURL (instructions below) when testing.



Sending sent messages via cURL

You can test sending messages using the REST FCM API by sending a request through cURL.

 curl --header "Authorization: key=<API_KEY>" \ --header Content-Type:"application/json" \ https://fcm.googleapis.com/fcm/send \ -d "{\"registration_ids\":[\"ABC\"]}" 

The syntax is derived from here .

The above API_KEY refers to the server key, which can be seen in the Cloud Messaging Cloud Firebase tab .

The part where:

 "{\"registration_ids\":[\"ABC\"]}" 

could be replaced by your own payload. For more information, see the FCM HTTP Documentation .

+2
source

Source: https://habr.com/ru/post/1261902/


All Articles