About
twhook is a simple Twitter Premium Account Activity API wrapper that helps you to manage webhooks and subscriptions.
Installation
Git:
git clone https://github.com/nxgeo/twhook.git
cd twhook
pip install -r requirements.txt
Pip:
pip install twhook
Examples
For easy implementation examples, see twhook/examples/.
Suggestion
As described in the Twitter Securing Webhooks guide, a first step is writing code that receives a Twitter Challenge-Response Check (CRC) GET request and responds with a properly formatted JSON response.
A CRC will be sent when you register your webhook URL, so implementing your CRC response code is a fundamental first step.
HERE is an example of implementing a CRC response in Python.
Reference
Account Activity API: Premium