Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/totigm/twitter-tokens-generator
This project generates access tokens for Twitter apps
https://github.com/totigm/twitter-tokens-generator
environment environment-variables javascript js node node-js nodejs twitter twitter-api twitter-bot
Last synced: 19 days ago
JSON representation
This project generates access tokens for Twitter apps
- Host: GitHub
- URL: https://github.com/totigm/twitter-tokens-generator
- Owner: totigm
- License: mit
- Created: 2021-06-19T22:45:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-16T15:06:10.000Z (about 2 years ago)
- Last Synced: 2023-03-06T10:25:16.373Z (over 1 year ago)
- Topics: environment, environment-variables, javascript, js, node, node-js, nodejs, twitter, twitter-api, twitter-bot
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Twitter OAuth Tokens Generator
This is a Twitter authentication tokens generator for [v1.1](https://developer.twitter.com/en/docs/twitter-api/v1) and [v2](https://developer.twitter.com/en/docs/twitter-api/early-access) apps that use OAuth.
With this keys you can use and manage a Twitter account with code using some libraries like [Twit](https://www.npmjs.com/package/twit), or some apps like [Twitter Crypto Bot](https://github.com/totigm/twitter-crypto-bot).
## 📋 Requirements
- [Node.js](https://nodejs.org)
- [Twitter developer account](https://developer.twitter.com)## Follow the steps
- Once you have your Twitter developer account, **create a new project and app** with it.
- Make sure your app has **v1.1 and v2 Access**. You can check this by going to ["Projects & Apps > Overview"](https://developer.twitter.com/en/portal/projects-and-apps).
- Open the app settings, go to the "Keys and tokens" section and generate an API Consumer Key and a Consumer Secret Key. Save them somewhere safe.
- If you have already generated the keys before and lost them, simply click on regenerate keys.
- Inside the app settings go to "Edit authentication settings".
- Enable "3-legged OAuth".
- Add a callback url exactly like this `http://localhost:3000/twitter/callback`.
- Clone this repo to your computer.
- Execute `yarn` or `npm i` inside the repo's directory.
- Create a file named `.env` in the root folder of the repository and add the following:```
CONSUMER_KEY=YOUR_CONSUMER_KEY
CONSUMER_SECRET=YOUR_CONSUMER_SECRET
```- Run `yarn start` or `npm start` and wait for your browser to open.
- Log in with your Twitter account that is going to be controlled by your Twitter application, or in case you are already logged in, just authorize it.
- Once it's finished, every key and token are going to be copied to your clipboard. Just paste them where you need.## 💖 Support the project
If you like what we do and want to encourage us to continue creating stuff, starring and sharing this project would be really appreciated!
## ✨ Contributing
Contributions are more than welcome!
We think that you might have great ideas to make this project better. If you do, please create a pull request and/or issue following the [contribution guidelines](./docs/CONTRIBUTING.md).
## 😃 Authors
- [Totigm](https://github.com/totigm)
- [Hernancano98](https://github.com/Hernancano98)## 📄 License
[MIT](./LICENSE)
This project was made with ❤ and JavaScript