unable to pass authentication


I am unable to pass authentication in my java application using YQL.

let's say I have a query that I can use in the query console http://developer.yahoo.com/yql/console/

for example "show tables".
The URL would be http://query.yahooapis.com/v1/yql?q=show%2...&format=xml

I try to do the same thing in my Java application

String request="http://query.yahooapis.com/v1/yql?q=show%20tables&format=xml";

GetMethod method = new GetMethod(request);

// Send GET request
int statusCode = client.executeMethod(method);

Follow the example at http://developer.yahoo.com/java/howto-reqRestJava.html

However, in this case, I get

Method failed: HTTP/1.1 401 Authorization Required

I then applied an app id and consumer id and consumer key and insert them as


I still get

WARN httpclient.HttpMethodDirector: Unable to respond to any of these challenges: {oauth=OAuth oauth_problem="parameter_absent", realm="yahooapis.com"}
Method failed: HTTP/1.1 401 Authorization Required

Do you know what the problem is?


1 Reply

Recent Posts

in YQL