send push message to ios return 403
ennnnzo opened this issue · comments
ennnnzo commented
It works for me to send push message to https://fcm.googleapis.com/fcm/send/
But if send to https://web.push.apple.com/
returns 403
{"reason":"BadJwtToken"}
ennnnzo commented
I just didnt set subscriber in options.If set , It works.
Adam commented
Indeed! Thanks for posting this as I was completely puzzled as to why it was working on desktop but not iOS!
resp, err := webpush.SendNotification([]byte(message), &pushSub, &webpush.Options{
Subscriber: "the-email-of-your-platform-sending-the-push-notif@test.com",
VAPIDPublicKey: vapidPublicKey,
VAPIDPrivateKey: vapidPrivateKey,
})