Publishing posts on X (Twitter) programmatically using Node (Part 1)

This is a 2 part tutorial which explains the setup and publishing of posts on X(Twitter) programmatically using Node and Angular. The frontend can be switched with any other SPA framework like React, Vue, Next. This 2 part series will cover

Part 1: Create a twitter admin application in developer.twitter.com

Part 2: Publish posts using XV2 API

By the end of this tutorial you will be able to successfully setup publishing of posts using X V2 API

X offers only 2 types of paid versions for production – Pro and Basic as of writing this tutorial. Pro offers up to 300000 posts per month with cost of $5000 USD per month and Basic offers up to 3K posts per month with cost of $100 USD per month.

Please refer to Twitter Developer Account for more recent updates.

However for development and learning purpose, X offers Free version which has its own Terms and Conditions. Please review the terms and conditions before proceeding to create the app.

Create an admin account and app in developer.twitter.com.

Click on Sign up for Free account

Create the project. The created project will be displayed in the left navigation

This tutorial will use OAuth1 authentication for publishing tweets to X. Next step will be to setup the app authentication settings. Select the created project and click on Set up as highlighted below

Select the App permissions as required and choose Web app as type of App.

Provide the application callback url and Save.

Last step is to setup the OAuth1 token key and secret

The Consumer keys (API key and secret) and the Authentication Tokens(Access Token and secret) will be used in the Part 2 of the tutorial to publish posts to X

Part 1 of this tutorial is complete. Part 2 of the tutorial will explain the steps to post tweets using the OAuth 1.0 authentication.

Leave a Reply