Skip to Content

This is one of the best the best apps to test the APIs, so thought of sharing about it.

To work with it, simply add this extension to your chrome browser. Visit – http://www.getpostman.com/ to add the extension.

This document discusses a sample scenario to test the Twitter Search API.

 

1. Create a new Test and select the Authorization tab. For Twitter we are using OAuth 1.0. So select the appropriate Authorization as per your need. Refer below –

Step1.png


2. Create an application on dev.twitter.com. Refer this link for more details.  We’ll require below details to populate them during authorization (the associated link mentioned above explains how to get it).

  • Consumer Key
  • Consumer Secret
  • Token
  • Token Secret

  

Step2.png


3. Testing API –

It’s up to you which functionality of Twitter you want to test. In my case I have tested the GET search/tweets functionality of the API. We’ll need the subsequent Resource URL and the parameters related to that API.

Twitter API – https://dev.twitter.com/rest/reference/get/search/tweets

Refer below screenshot:

Step3.png

Here you’ll get the necessary Resource URL which you need to pass in the URL section of the POSTMAN test case created by you.

Besides in the Parameter section pass the parameters for the API. In our case it is:

key = q and Value = BankofBaroda109 where q stands for query.

Refer below screen.

Step4.png

Once done. Click on Send to get the data from API. There you go.

Step5.png

There is also alternative way to test Twitter API – https://dev.twitter.com/rest/tools/console

      

This is a very basic test. But, you can explore more from your end to get the most of it.

     

Hope this document helps at the introductory level.


Regards – Santosh G.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply