Coder Social home page Coder Social logo

Comments (4)

gclsoft avatar gclsoft commented on June 17, 2024
        if response.status_code == 401:
            raise common.Unauthorized

But my network is ok.

from jpush-api-python-client.

gclsoft avatar gclsoft commented on June 17, 2024

I've set config in config.py. Please help me

from jpush-api-python-client.

gclsoft avatar gclsoft commented on June 17, 2024
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.

gclsoft avatar gclsoft commented on June 17, 2024

app_key = ' '
master_secret = ' '
remove u

from jpush-api-python-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.