How to get Google Bookmarks using GoogleAuthUtil.getToken()?

I’m creating an app that manages Google Bookmarks (from but I’m confused on how to do both the Google authentication part and bookmark request part.

As I understand it there is no Google Bookmarks API, and bookmarks are not covered by the GoogleApiClient. I’ve tried some code from here where I do the following:

    try {
         String token = GoogleAuthUtil.getToken(mActivity, mEmail, mScope);
         return token;
    } catch (UserRecoverableAuthException userRecoverableException) {
    } catch (GoogleAuthException fatalException) {

This seems to work fine and returns an OAuth token, but then how do I use this token to get the bookmarks using my code below.

String url = "";
HttpClient httpclient = new DefaultHttpClient();
HttpGet get = queryBookmarks(url, outputType, numBookmarks, sortOrder, null);
try {
    HttpResponse response = httpclient.execute(get);
    BufferedReader in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
    line = in.readLine();

Should I even be using GoogleAuthUtil.getToken() or do I need to use the GoogleApiClient. Any help much appreciated !

Source: bookmarks

Leave a Reply