Kindly follow the below steps for how to get Twitter Consumer and Secret Key.
Log into the Twitter Developers section. If you don’t already have an account, you can login with your normal Twitter credentials
After that you have to navigate the option Create an app.
Fill in the details of the application you’ll be using to connect with the API
- Your application name must be unique. If someone else is already using it, you won’t be able to register your application until you can think of something that isn’t being used.
Change permissions if necessary(depending if you want to just read,write or execute)
Click on Create your Twitter application . Details of your new app will be shown along with your consumer key and consumer secret.
If you need access tokens, scroll down and click Create my access token. The page will then refresh on the “Details” tab with your new access tokens. You can recreate these at any time if you need to.