Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nxgeo/twhook
Twitter Premium Account Activity API wrapper.
https://github.com/nxgeo/twhook
api python twitter webhook wrapper
Last synced: about 1 month ago
JSON representation
Twitter Premium Account Activity API wrapper.
- Host: GitHub
- URL: https://github.com/nxgeo/twhook
- Owner: nxgeo
- License: mit
- Created: 2021-09-18T14:35:00.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-28T11:25:28.000Z (over 2 years ago)
- Last Synced: 2024-12-07T20:59:45.817Z (about 2 months ago)
- Topics: api, python, twitter, webhook, wrapper
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
## About
Twhook is a simple Twitter Premium Account Activity API wrapper that helps you to manage webhooks and subscriptions.## Installation
Git:
```bash
git clone https://github.com/nxgeo/twhook.git
cd twhook
pip install -r requirements.txt
```
Pip:
```bash
pip install twhook
```## Examples
For basic implementation, see [twhook/examples](https://github.com/nxgeo/twhook/tree/master/examples).## Suggestion
As described in the [Twitter Securing Webhook](https://developer.twitter.com/en/docs/twitter-api/premium/account-activity-api/guides/securing-webhooks) guide, the 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](https://gist.github.com/nxgeo/74f35a3ab5951740892f811a83f2d403) is an example of implementing a CRC response in Python.
## Reference
[Account Activity API: Premium](https://developer.twitter.com/en/docs/twitter-api/premium/account-activity-api)