Getting new Twitter API consumer and secret keys

twitter, twitter-oauth

Solution

To get Consumer Key & Consumer Secret, you have to create an app in Twitter via

https://developer.twitter.com/en/apps

Then you'll be taken to a page containing Consumer Key & Consumer Secret.

Hopefully this information will clarify OAuth essentials for Twitter:

- Create a Twitter account if you don't already have one

- Visit 'https://apps.twitter.com' and follow the required prompts to create a developer project (Twitter requires you to answer some questions before they will approve your account. Approval was nearly instant in my case.)

- Requesting the API key and secret via the Developer Portal causes Twitter to produce the following three things:

- API key (this is your 'consumer key')

- API secret key (this is your 'consumer secret')

- Bearer token

- Next, visit the 'Authentication Tokens' area of the Developer Portal and generate an 'Access token & secret'. This will provide you with the following two items:

- Access token (this is your 'token key')

- Access token secret (this is your 'token secret')

- The consumer key, consumer secret, token key, and token secret should be sufficient to do Twitter API calls (they were for me).

Problem

I am working on a Twitter project where I want to use OAuth but I don't know where to get the consumer and secret keys. How can I get these?

Original source