Retrieve your recent Tweets using REST Assured GET Request

Profile picture for user devraj

Follow below steps to retrieve your recent tweets:

Step 1: Create a twitter account.

Step 2: Create your app on Twitter and generate keys and tokens. Follow steps here.

Step 3: Add following code:

public class TwitterAPITest 
	String consumerKey = "";
	String consumerSecret = "";
	String accessToken = "";
	String tokenSecret = "";
	public void setup()
		RestAssured.baseURI = "";
		RestAssured.basePath = "/1.1/statuses";

	/*Post request example*/
	public void getExample()
        Response res = 
                .oauth(consumerKey, consumerSecret, accessToken, tokenSecret)