简体   繁体   中英

i was trying to sending notification through firebase console api

Help

i was sending notification through firebase console api and it is giving a bad json format error, i have properly put the headers and authentication key and every requirement.

At first glance, it seems you're using an incorrect endpoint. Based on the format, you're using the Legacy API so the endpoint should be:

https://fcm.googleapis.com/fcm/send

Also, you don't need to specify the project_id so you should remove it in the header. You can check out this guide on how to build send request.

You didn't include the payload of the message so I'm not sure if they are valid as well. Just a reminder to share your code in text next time instead of linking a screenshot so others can easily see its content. You can read how to ask .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM