I would like to know if you can name the Google API that requires authorization, such as the Google Calendar API, using Apache HttpClient, as well as no Google code or libraries. (and need code for this)
This is the code that I still have, it gets an auth error, What do you use for the user / password?
HttpPost request = new HttpPost("https://www.googleapis.com/calendar/v3/users/me/calendarList/primary?key=mykey"); DefaultHttpClient client = new DefaultHttpClient(); client.getCredentialsProvider().setCredentials( new AuthScope(AuthScope.ANY), new UsernamePasswordCredentials(user, password)); HttpResponse response = client.execute(request);
Mistake:
"errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Login Required"
James
source share