All Projects → twitterdev → Twitter Webhook Boilerplate Node

twitterdev / Twitter Webhook Boilerplate Node

A simple Node.js app using Express 4 for Twitter DMs and webhooks.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Twitter Webhook Boilerplate Node

Tradingview Webhook Bot
⚙️ Send TradingView alerts to Telegram, Discord, Slack, Twitter and/or Email.
Stars: ✭ 135 (+95.65%)
Mutual labels:  webhook, twitter
Autohook
Automatically setup and serve webhooks for the Twitter Account Activity API
Stars: ✭ 67 (-2.9%)
Mutual labels:  webhook, twitter
drf-stripe-subscription
An out-of-box Django REST framework solution for payment and subscription management using Stripe.
Stars: ✭ 42 (-39.13%)
Mutual labels:  subscription, webhook
Account Activity Dashboard
Sample web app and helper scripts to get started with the premium Account Activity API
Stars: ✭ 129 (+86.96%)
Mutual labels:  webhook, twitter
Android Dev Sources
All those Android development sources that you need to be and stay awesome!
Stars: ✭ 434 (+528.99%)
Mutual labels:  subscription, twitter
Twitter Bookmarks Search
WebExtension that adds ability search all your bookmarked tweets!
Stars: ✭ 59 (-14.49%)
Mutual labels:  twitter
Likelo
Twitter auto like bot, Under Development👷, Pre Alpha
Stars: ✭ 64 (-7.25%)
Mutual labels:  twitter
Discordconsole
Control your Discord & Discord bot accounts and Webhooks through the command line.
Stars: ✭ 58 (-15.94%)
Mutual labels:  webhook
Project Sauron
Tools to create a Native Windows Audit Collection Platform. Active Directory example provided
Stars: ✭ 58 (-15.94%)
Mutual labels:  subscription
Hitomi Downloader
🍰 Desktop application to download images/videos/music/text from Hitomi.la and other sites, and more.
Stars: ✭ 1,154 (+1572.46%)
Mutual labels:  twitter
Persian Twitter
A WebExtension which improves Twitter & TweetDeck user experience for Persian users
Stars: ✭ 66 (-4.35%)
Mutual labels:  twitter
Gbf Raiders
A Raid Finder For Grand Blue Fantasy
Stars: ✭ 63 (-8.7%)
Mutual labels:  twitter
Anatine
[DEPRECATED] 🐦 Pristine Twitter app
Stars: ✭ 1,102 (+1497.1%)
Mutual labels:  twitter
Share Selected Text
share selected text on twitter, buffer, and some others. Inspired by medium.com
Stars: ✭ 64 (-7.25%)
Mutual labels:  twitter
Twitter.jl
Julia package to access Twitter API
Stars: ✭ 58 (-15.94%)
Mutual labels:  twitter
Broid Kit
Bot framework powered by Broid
Stars: ✭ 58 (-15.94%)
Mutual labels:  twitter
Peony Twitter
An asynchronous Twitter API client for Python 3.5+
Stars: ✭ 62 (-10.14%)
Mutual labels:  twitter
Devtwitter
Bringing dev.to headlines to your Twitter browsing experience.
Stars: ✭ 66 (-4.35%)
Mutual labels:  twitter
Djaoapp
User login, billing, access control as part of a session proxy
Stars: ✭ 61 (-11.59%)
Mutual labels:  subscription
Twoot
An open source light-weight OS X twitter client based on jQuery and Fluid (deprecated!)
Stars: ✭ 61 (-11.59%)
Mutual labels:  twitter

Twitter Webhook Boilerplate Node

Starter web app for consuming events via Account Activity API (beta).

Note: This application is only compatible with the DM-only beta version of the Account Activity API. The DM-only beta will end on August 16, 2018 and this app will no longer be fully funcional. Please see this project for updated example code to get started with the Account Activity API.

Dependencies

Create and configure a Twitter app

  1. Create a Twitter app on apps.twitter.com

  2. On the Permissions tab > Access section > enable Read, Write and Access direct messages.

  3. On the Keys and Access Tokens tab > Your Access Token section > click Create my access token button.

  4. On the Keys and Access Tokens tab, take note of the consumer key, consumer secret, access token and access token secret.

Setup & run the Node.js web app

  1. Clone this repository:

    git clone https://github.com/twitterdev/twitter-webhook-boilerplate-node.git
    
  2. Install Node.js dependencies:

    npm install
    
  3. Create a new config.json file based on config.sample.json and fill in your Twitter keys and tokens.

  4. Run locally:

    node index
    
  5. Deploy app. To deploy to Heroku see "Deploy to Heroku" instructions below.

    Take note of your webhook URL. For example:

    https://your.app.domain/webhooks/twitter
    

Configure webhook to receive events via the API

  1. Create webhook config. Update WEBHOOK_URL in source code.

    node example_scripts/webhook_management/create-webhook-config.js 
    

    Take note of returned webhook_id.

  2. Add user subscription. Update WEBHOOK_ID in source code.

    node example_scripts/webhook_management/add-subscription.js 
    

    Subscription will be created for user the context provided by the access tokens.

  3. Test configuration by sending a DM to or from the subscribed account. You should receive a message event on your deployed webhook app.

Example Scripts

See the example scripts in the example_scripts directory to:

  • Send Direct Messages.
  • Manage webhook configs and subscriptions.
  • Setup Welcome Message deeplinks and defaults.

Deploy to Heroku (optional)

  1. Init Heroku app.

    heroku create
    
  2. Run locally.

    heroku local
    
  3. Configure environment variables. Set up an environment variable for every property on config.json. See Heroku documentation on Configuration and Config Vars.

  4. Deploy to Heroku.

    git push heroku master
    

Note: The free tier of Heroku will put your app to sleep after 30 minutes. On cold start, you app will have very high latency which may result in a CRC failure that deactivates your webhook. To trigger a CRC request and re-validate, run the following script with your WEBHOOK_ID:

node example_scripts/webhook_management/trigger-crc-request.js

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].