iOS发送带有APNs身份验证密钥的推送:突然"403禁止访问:{"原因":"InvalidProviderToken"}"; [英] iOS sending push with APNs Auth Key: suddenly "403 Forbidden: {"reason":"InvalidProviderToken"}"

查看:912
本文介绍了iOS发送带有APNs身份验证密钥的推送:突然"403禁止访问:{"原因":"InvalidProviderToken"}";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用APNs身份验证密钥(永不过期")发送推送通知,该密钥一直有效,直到我突然收到

I'm sending my push notifications with an APNs Auth Key ("never expires") which worked well until suddenly I get

403 Forbidden: {"reason":"InvalidProviderToken"}

作为发送推送通知时的响应.当它一次工作却突然没有到期日期时,可能是什么原因呢?同时,它在进行某些推送时再次起作用,但是现在我又收到了错误消息……其他人是否遇到过这种情况?

as a response when sending push notifications. What could be the reason for this when it worked once and suddenly it doesn't without having an expiration date? In the meantime it worked again for some pushes, but now I get the error again... Did anyone else experience this?

编辑

不确定,但这似乎仅发生在Ubuntu服务器上,而不是我的本地(OS X)计算机上...

推荐答案

在几种情况下,我已经看到了这一点:

I've seen this in a couple of circumstances:

  1. 重新提交过期的提供者令牌似乎使令牌被列入黑名单,并导致随后的InvalidProviderToken拒绝而不是ExpiredProviderToken拒绝.检查您的日志中是否有令牌到期消息.检查您的系统时钟,以确保您没有生成带有歪斜时间戳记的令牌.

  1. Resubmitting expired provider tokens seems to get the token blacklisted and results in subsequent InvalidProviderToken rejections rather than ExpiredProviderToken rejections. Check you logs for token expiry messages. Check your system clock to make sure that you're not generating tokens with skewed timestamps.

提交无效的主题将使连接上的所有提供程序令牌(甚至以前有效的令牌)也无效.仅提交与该键绑定的主题,并且每个连接仅使用一个键.

Submitting to invalid topics will invalidate all provider tokens on the connection (even previously valid ones). Only submit to topics that the key is bound to and only use one key per connection.

这篇关于iOS发送带有APNs身份验证密钥的推送:突然"403禁止访问:{"原因":"InvalidProviderToken"}";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆