When calling, it returns {“errors”:[{“message”:“Your credentials do not allow access to this resource”,“code”:220}]}

I am able to get the Bearer token and am using Apache DefaultHttpClient in the following manner:
String url = "
HttpGet httpGet = new HttpGet(url + “?” + params);
httpGet.setHeader(“Authorization”, "Bearer " + bearerToken);
HttpResponse response = httpclient.execute(httpGet);

Any thoughts on why the error?


Have you taken a look at how the request is actually being sent to Twitter? (As in, is the HTTP client you’re using doing the right thing?) Have you tried using the bearer token on the command line (for instance in curl) to verify it’s functioning?


have you found a solution to this problem? I think I have the same error.


Anyone with a solution to this?