Use twURL, Save Time

Let's use twURL to quickly get/store credentials to our Twitter app from any account we access.

First step, get twURL:

$ gem install twurl

Second step, initiate PIN-authentication for your existing application using its API key and API Secret:

$ twurl authorize -c YOUR_API_KEY -s YOUR_API_SECRET

In a browser where your bot's account is logged in, follow the link given in the output, and enter the PIN displayed back into your terminal window.

Now the consumer_key/consumer_secret/auth_token/auth_token_secret are stored in plaintext in ~/.twurlrc

$ head ~/.twurlrc
---
profiles:
  BOT_USERNAME:
    CONSUMER_KEY:
      username: BOT_USERNAME
      consumer_key: CONSUMER_KEY
      consumer_secret: CONSUMER_SECRET
      token: AUTH_TOKEN
      secret: AUTH_TOKEN_SECRET
        

and Bob's your uncle.