In this session we would be looking into how to
automate one of the most complex and tricky API i.e Twitter API.
As we know for accessing any APIs we first need to
provide some sort of authorization so that we can access those API over their
server.
Twitter API basically uses Oauth 1.0a and Oauth2
Authentication.
All this information we could easily find by reading twitter official documentation of these API on this link.
To know more about Oauth authentication please click on
this link.
Twitter API Provide Oauth in the form of Consumer Key,Consumer Secret,Token and Token Secret which we need to generate for our testing purpose.
Pre-requisite for Automating Twitter API is that we
should have active working Twitter account.
Please login into twitter website and create new
account if you don’t have. Otherwise we are ready to go.
Now below steps we need to follow to create Consumer Key,Consumer Secret,Token and Token Secret
1) Login
into https://developer.twitter.com/en/apps
and enter your twitter used id and password.
2) Click
on Create an App Option
3) Fill
out the mandatory information. Please Note you can provide any website and Call
back URL.
4) Fill
out all the Remaining Mandatory fields and click on Create.
5) Now
Click on Keys and Tokens where we would be able to see consumer key and
Consumer Secret Token.
6) Click
on Create Option under Access Token & access Token Secret to generate token
& token secret.
Note down all this Keys carefully with you for all future testing.
Please make sure not to share this access token with
anyone as it would be specific only for your account.
Don’t try to use even mine I am going to delete it
after using this token :)
If all Steps are done we are now Ready to Automate few sample twitter APIs.For that Refer to my next blog.
Access
When we expect new blog:-)
ReplySubscribe your email for the new information on this blog :)
Reply