Skip to content


Subversion checkout URL

You can clone with
Download ZIP


impossible to access a public resource without being logged. #6

Teovald opened this Issue · 1 comment

2 participants


Trying to fetch a public resource fails with Error 401 : Unauthorized

ApiWrapper wrapper = new ApiWrapper(client_id, client_secret, null,null);
HttpResponse response = wrapper.get("/tracks").with("CLIENT_ID", client_id, "order", "hotness"));

It works only if wrapper.login is called beforehand, which is not always possible and is not supposed to be necessary. It is problematic if you want to let your user explore the app a little bit without forcing him to authenticate himself as the first step.

As a workaround, making the call myself works perfectly (but it defeats the interest of having a wrapper):

HttpGet request = new HttpGet("");
            HttpClient client = new DefaultHttpClient();
            response = client.execute(request);
@jberkel jberkel closed this in 8995c61

Thanks for the update, much appreciated !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.