GithubHelp home page GithubHelp logo

enrian / apns-notifier Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 9 KB

A simple Python 2.7 Flask app for sending APNs notifications over Apple's legacy TCP protocol (not HTTP/2).

License: MIT License

Python 100.00%

apns-notifier's Introduction

This is a very crude Flask app that accepts notification requests via REST call and creates and sends out APNs push notifications. This app only works with Apple's legacy TCP connections, not the newer HTTP/2 transport.

You will need one or two certificates from Apple plus their matching private keys: one cert/key for the sandbox environment and another for production APNs service.

To run:

% python notifier.py
 * Running on http://127.0.0.1:8066/ (Press CTRL+C to quit)

Testing. Get the device token returned to your mobile device from Apple. This should be a 32-byte value in a Data instance. Convert to a 64-character hex string and plop in the curl command below replacing DEVICE_TOKEN with your value:

curl -X POST -H 'Content-Type:application/json' -d '{"platform":"apple","device_id":"DEVICE_TOKEN","type":"message","channel_name":"taskme_foo"}' http://localhost:8066/api/v1/send_push

apns-notifier's People

Contributors

bradhowes avatar brh-enrian avatar

Watchers

 avatar  avatar  avatar

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.