Most integrations with the API will require you to identify your application to Twitter by way of an API key. On the Twitter platform, the term “API key” usually refers to what’s called an OAuth consumer key. This string identifies your application when making requests to the API. In OAuth 1.0a, your “API keys” probably refer to the combination of this consumer key and the “consumer secret,” a string that is used to securely “sign” your requests to Twitter.
Most requests to Twitter require a user context in addition to the application context. User context is presented through the use of another kind of token/key called the “access token.” See Obtaining access tokens for more information.
Some Twitter API methods allow the use of Application-only authentication in this context, your consumer key and secret are used to obtain what’s called a “bearer token” that represents your application.
Enough of the theory, lets get our hand dirty and discover how you can obtain your Twitter Api for your account:
- Step 1: Go to https://dev.twitter.com/apps and sign-in there with your twitter account credentials.
- Step 2: Click on Create new Application button.
- Step 3: You will be redirected to below page. Enter a unique name to you application, description, website and callback URL. Website and callback URL dont need to be correct, if you are unsure of these then you can enter just junk info.
- Step 4: Here you have your API key and secret code, note it. But before you jump right on to get your sketchThemes widgets working, do follow the step 5. Click on Settings tab.
- Step 5: Tick Read and Write option under Access section.
Now you are all good to start using your API key and secret number obtained in step 4. Good bye!