Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6547081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:47:12+00:00 2026-05-25T11:47:12+00:00

After authentication from google servers for google docs, I do a simple getResponse, but

  • 0

After authentication from google servers for google docs, I do a simple getResponse, but I get a 400 Bad Request. I can’t understand where am I going wrong. The sample code is, below

  private void executeRefreshAlbums() {
        HttpRequest request = transport.buildGetRequest();
        request.url = GoogleDocsUrl.forDefaultPrivateFull();
        System.out.println("URL = "+request.url);
        try {
            HttpResponse response = request.execute();
            System.out.println("Response = "+response.getContent());

        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

  }

The sysout prints the correct url as

03-12 17:36:59.573: INFO/System.out(451): URL = https://docs.google.com/feeds/default/private/full

But When I do this, I get

03-12 17:43:41.360: WARN/System.err(3958): com.google.api.client.http.HttpResponseException: 400 Bad Request
03-12 17:43:41.415: WARN/System.err(3958):     at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:209)
03-12 17:43:41.415: WARN/System.err(3958):     at com.example.Test.executeRefreshAlbums(Test.java:198)
03-12 17:43:41.415: WARN/System.err(3958):     at com.example.Test.authenticated(Test.java:190)
03-12 17:43:41.415: WARN/System.err(3958):     at com.example.Test.authenticatedClientLogin(Test.java:156)
03-12 17:43:41.415: WARN/System.err(3958):     at com.example.Test.access$1(Test.java:153)
03-12 17:43:41.415: WARN/System.err(3958):     at com.example.Test$2$1.run(Test.java:139)
03-12 17:43:41.415: WARN/System.err(3958):     at android.os.Handler.handleCallback(Handler.java:587)
03-12 17:43:41.415: WARN/System.err(3958):     at android.os.Handler.dispatchMessage(Handler.java:92)
03-12 17:43:41.415: WARN/System.err(3958):     at android.os.Looper.loop(Looper.java:123)
03-12 17:43:41.415: WARN/System.err(3958):     at android.app.ActivityThread.main(ActivityThread.java:4363)
03-12 17:43:41.415: WARN/System.err(3958):     at java.lang.reflect.Method.invokeNative(Native Method)
03-12 17:43:41.415: WARN/System.err(3958):     at java.lang.reflect.Method.invoke(Method.java:521)
03-12 17:43:41.422: WARN/System.err(3958):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-12 17:43:41.422: WARN/System.err(3958):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-12 17:43:41.422: WARN/System.err(3958):     at dalvik.system.NativeStart.main(Native Method)

Any help would be really appreciated. I have been trying it for an hour now 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:47:13+00:00Added an answer on May 25, 2026 at 11:47 am

    At the other thread user @Merlin provided the solution which solved similar issue. His solution was to specify the API version number 3.0 in the request as stated in the “Google Documents List Data API” document:

    Important: If you make a request to the API that uses a feature only
    available in version 3, but forget to set the version, you will most
    likely receive a 400 Bad Request response. Since the URL structure is
    different between versions 2 and 3, this is a common mistake made by
    new users of the API.

    To specify a version number, use the
    GData-Version HTTP header. The value of this header must be 3.0. The
    decimal and the zero are required.

     GData-Version: 3.0

    Alternatively,
    you can specify v=3 as a query parameter in the URL. This is often
    needed when working behind a firewall that strips HTTP headers, or
    from some JavaScript requests. Use of the HTTP header is recommended
    when possible.

      https://docs.google.com/feeds/default/private/full?v=3

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using django, I am authenticating the user through Google. I get the initial request
I’ve got a moss document centre website with FBA and AD authentication enabled. After
I've been studying the Google authentication API (AuthSub)... My question is, how do I
I have an application developed on MVC2 but I need it to change from
As the title states, I can connect to another machine from my server via
I want to get data from an API using Python. The API documentation give
I try to get a page with curl from an IIS-Server which demands user
After reading the Head First Design Patterns book and using a number of other
After the suggestion to use a library for my ajax needs I am going
After reading this question , I was reminded of when I was taught Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.