Notification submission does not recognize attribute time_to_live (TTL) in cURL with Firebase

0

Hi, I have a problem with notifications sent through Firebase , the notification is sent perfectly, but by setting the time_to_live (TTL) attribute or message life time it does not recognize it, just overlooked and does not take it into account

curl -X POST -H "Authorization: key=<KEY-API>" -H  Content-Type: 
application/json" -d 
"{\"webpush\":{
     \"headers\":{
        \"TTL\":\"5s\"}
        },
  \"to\": \"<TOKEN>\", 
     \"notification\": { 
        \"title\": \"Clase\", 
        \"body\": \"Tienes una clase en vivo en 5 minutos.\", 
        \"icon\": \"/firebase-logo.png\"}}" "https://fcm.googleapis.com/fcm/send"

What is wanted is that when a notification is sent and the browser is closed for more than a certain time (TLL), the notification does not reach its destination and I understand according to the documentation that the TLL applies for that case

the cURL is written in this way by the use of windows CMD for sending test notifications

    
asked by victor leon 27.08.2018 в 18:41
source

0 answers