返回成功,但是极光推送的网页上看不到消息,同时客户端收不到消息

tyan
2017-08-11 06:46 1.2k 0

我用的PythonSDK

调用了代码
def push_all():
push = jpush.create_push()
push.audience = jpush.all

push.notification = jpush.notification(alert="API推送的消息")
push.platform = jpush.all_
try:
response = push.send()
except common.Unauthorized:
raise common.Unauthorized("Unauthorized")
except common.APIConnectionException:
raise common.APIConnectionException("conn")
except common.JPushFailure:
print ("JPushFailure")
except:
print ("Exception")

在控制台里面显示也是成功了。

DEBUG:jpush:Making POST request to https://api.jpush.cn/v3/push. Headers:
connection: keep-alive
content-type: application/json;charset:utf-8
user-agent: jpush-api-python-client
Body:
{"platform": "all", "audience": "all", "notification": {"alert": "API\u63a8\u9001\u7684\u6d88\u606f"}}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.jpush.cn
DEBUG:urllib3.connectionpool:https://api.jpush.cn:443 "POST /v3/push HTTP/1.1" 200 None
None
DEBUG:jpush:Received 200 response. Headers:
Server: nginx
Date: Fri, 11 Aug 2017 06:38:06 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Rate-Limit-Limit: 600
X-Rate-Limit-Remaining: 599
X-Rate-Limit-Reset: 60
X-JPush-MsgId: 1472068371
Body:
{"sendno":"0","msg_id":"1472068371"}
[11/Aug/2017 14:38:05] "GET /message/test_jpush/ HTTP/1.1" 200 37

但是极光的网页上看不到推送的消息。而且网页上的延迟很大。而且iOS的测试环境的设备收不到推送。

1个回答

热门排序
  • 1.api推送的消息,在推送历史上是需要筛选api/web中的api才能看到的。2,收不到消息的问题:请提供推送的消息的msgid(MessageID)和收不到这条消息的设备的registrationID(在客户端获取,无论以何种方式做推送 展示全部