Comments (4)
if response.status_code == 401:
raise common.Unauthorized
But my network is ok.
from jpush-api-python-client.
I've set config in config.py. Please help me
from jpush-api-python-client.
pydev debugger: process 27014 is connecting
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2358, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/apple/node/undo4096/tool/videoPei/btc/huobi/btcChina/push.py", line 13, in <module>
push.send()
File "/Library/Python/2.7/site-packages/jpush/push/core.py", line 46, in send
common.PUSH_URL, 'application/json', version=3)
File "/Library/Python/2.7/site-packages/jpush/core.py", line 45, in _request
raise common.Unauthorized
jpush.common.Unauthorized
#!/usr/bin/env python
-- coding: utf-8 --
import jpush as jpush
from conf import app_key, master_secret
_jpush = jpush.JPush(app_key, master_secret)
push = jpush.create_push()
push.audience = jpush.all
ios_msg = jpush.ios(alert="Hello, IOS JPush!", badge="+1", sound="a.caf", extras={'k1':'v1'})
push.notification = jpush.notification(alert="Hello, JPush!")
push.options = {"time_to_live":86400, "sendno":12345, "apns_production":True}
push.platform = jpush.platform("ios")
push.send()
Helpless
from jpush-api-python-client.
app_key = ' '
master_secret = ' '
remove u
from jpush-api-python-client.
Related Issues (20)
- ios无法收到推送的消息 HOT 2
- 推送个多个 `alias` 时,如果某个 `alias` 找不到可能导致所有的推送都失败 HOT 3
- 对于device的操作,使用logger而不是print HOT 1
- 项目说明中IOS示例android_msg未定义 HOT 1
- Python SDK 如何控制IOS平台为开发环境还是生产环境 HOT 1
- 推送通知添加 'title'和 'extras'字段就报错 HOT 1
- 3.2 Python 兼容问题 HOT 1
- jpush/push/payload.py 中def android的参数alert没有默认值None HOT 1
- no
- 为何不把3.2.4发布到pypi? HOT 1
- No connection adapters were found for ' https://api.jpush.cn/v3/push' HOT 5
- 是否不支持title,body的ios推送? HOT 2
- Hi I am having issue with master and app key
- 超时的时候无法确认是否 极光有处理 HOT 1
- [Bug] TypeError: Object of type 'bytes' is not JSON serializable
- 给reg id发送成功但是无法收到消息
- SDK不支持android推送参数sound HOT 1
- 文件推送还不支持
- push.send()后没有推送限制数据
- 已经添加了ip白名单 等待了半小时后 还是code=2004 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpush-api-python-client.