twitter-oauth1-token

1.0.4 • Public • Published

Twitter API Auth

Overview

When creating bots, I always forget how to generate an auth token for another user via the OAuth 1.0 flow. I tried creating OAuth 2.0 flows, but I think it required persisting a refresh token. If I can just use the 1.0 token perpetually, that's better. (If I'm wrong on this, I'd love to know more.)

My goal is to get this npx'able, but I'm not sure what is necessary.

Related

Usage

➜ node index.js
=================================

Twitter OAuth 1.0 token generator

=================================

Twitter API Key: (YOUR TWITTER API KEY)
Twitter API Secret: (YOUR TWITTER API SECRET)

This will open a web browser window to authenticate the account you wish to post as.

Authenticate & the page will refresh, showing you API credentials in the form:

{
  "accessToken": "...",
  "accessSecret": "...",
  "userId": "twitter_numerical_user_id",
  "screenName": "twitter_screenname"
}

Readme

Keywords

Package Sidebar

Install

npm i twitter-oauth1-token

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

4.76 kB

Total Files

4

Last publish

Collaborators

  • meandmybadself