通过 rest api 发送消息时如何设置通知通道?

How to set notification channel when sending messages via rest api?

我一直在我的 android 应用程序中实施通知渠道以支持最近的 android 版本。

您可以在从 firebase 网络控制台发送消息时设置通知通道 ID,但我无法找到如何在通过 fcm rest 发送消息时设置通道 ID api.

参考文献中没有提到通知渠道 (https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages),但我很确定必须有一种方法来设置渠道 ID。

我遗漏的键名是android_channel_id

我在 旧版 HTTP 服务器协议文档 (https://firebase.google.com/docs/cloud-messaging/http-server-ref)

中找到了密钥名称