Skip to content

smswithoutborders/twitter-oauth2-adapter

Repository files navigation

Twitter OAuth2 Platform Adapter

This adapter provides a pluggable implementation for integrating Twitter as a messaging platform. It is designed to work with RelaySMS Publisher, enabling users to connect to Twitter using OAuth2 authentication.

Requirements

Dependencies

On Ubuntu

Install the necessary system packages:

sudo apt install build-essential python3-dev

Installation

  1. Create a virtual environment:

    python3 -m venv venv
  2. Activate the virtual environment:

    . venv/bin/activate
  3. Install the required Python packages:

    pip install -r requirements.txt

Configuration

  1. Obtain your credentials from the Twitter Developer Portal.
  2. Set the credentials.json path of your credentials file in the manifest.ini:
   [credentials]
   path = ./credentials.json

Sample credentials.json

{
  "client_id": "",
  "client_secret": "",
  "redirect_uris": ["http://localhost/callback/"]
}

Only the first item in the redirect_uris is used for the OAuth2 flow.

About

Pluggable Twitter OAuth2 adapter for RelaySMS Publisher.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages