Twilio推送通知:使用Passthrough API发送时获得接收状态

我正在使用Twilio通知服务将推送通知发送到APN和FCM。对于一次发送给大量用户的情况,我们想切换到直通API。但是,我没有在响应中得到to_binding字段,因此不知道有多少成功或失败。使用identity发送时,我们得到了一组身份标识。

这是我们要发送的内容:

twilio_client.notify.v1.services(ENV.fetch('TWILIO_NOTIFY_SERVICE')).notifications.create(
  to_binding: params[:users],body: params[:body],title: params[:title],data: {data: @data},fcm: {
    data: {
      title: params[:title],body: params[:body]
    }
  }
)

我在设备上收到通知,但这是我得到的回信:

{"body": "stuff","sound": null,"sms": null,"alexa": null,"facebook_messenger": null,"tags": [],"title": "My Title","segments": [],"ttl": 545435,"gcm": null,"account_sid": "account_id","priority": "high","apn": null,"data": {"data": {"a_thing": 995,"type": "My Type","id": 4344}},"sid": "myid","action": null,"date_created": "2019-11-05T15:25:27Z","service_sid": "service_id","identities": [],"fcm": {"data": {"body": "stuff","title": "My Title"}}}

在文档(https://www.twilio.com/docs/notify/api/notification-resource?code-sample=code-send-a-notification-to-bindings-in-the-request-1&code-language=Ruby&code-sdk-version=5.x)的示例中,看来toBindings字段应该回来了。

是否有办法使该工作正常进行,或者有某种方式在收到通知ID后获取接收的收据数据?

nut0032 回答:Twilio推送通知:使用Passthrough API发送时获得接收状态

截至目前,此功能尚未实现,并且即将在iOS和Android SDK的“即将推出”部分中提到

本文链接:https://www.f2er.com/3158349.html

大家都在问