Member-only story
Building a Twitter bot is part of the holy pilgrimage to being a hobbyist developer. Let’s face it: building bots is fun.
Let’s take our first steps into how we can make our first Tweet with NodeJS. We will go through a simple four-step process on how to get up and running with your first bot!
Step One: Get access
As of writing, it is a requirement to apply for access for a developer Twitter account. It is nice and straight-forward and requires a couple of minutes to fill out.
This step is only required if you have no yet done this.
Step Two: Get tokens
Once you have access to the Developer Dashboard, you can create your first app and obtain your Twitter access tokens.
From the dashboard, you will need to head to Projects & Apps > Your Project > Your App
and select Keys and tokens
on the tabs at the top. This will give you access to copy and save your API Key & Secret
. These will only be available for a day or so. Make sure you store them somewhere secure! I always opt for a password manager.
You will also need to generate the Access Token & Secret
. This an be done under Authentication Tokens
. Do the same by copying these and keeping them safe. We will need all four of the keys we have stored.