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

  • SEARCH
  • Home
  • 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 8291057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:00:07+00:00 2026-06-08T13:00:07+00:00

I am trying to copy an existing spreadsheet document by following the example on

  • 0

I am trying to copy an existing spreadsheet document by following the example on the documentation page. I use ClientLogin method to authenticate. My first step is to get the template doc:

SpreadsheetService service =
    new SpreadsheetService("MySpreadsheetIntegration-v1");
service.setUserCredentials(USERNAME, PASSWORD);

DocumentQuery query = new DocumentQuery(new URL(
    "https://spreadsheets.google.com/feeds/spreadsheets/private/full")); 
query.setTitleQuery("template"); 
query.setTitleExact(true); 

SpreadsheetFeed feed = service.getFeed(query, SpreadsheetFeed.class);
List<SpreadsheetEntry> spreadsheets = feed.getEntries();

SpreadsheetEntry template = spreadsheets.get(0);

All is fine. In template I have the document. Then I try to create a new one:

SpreadsheetEntry newDoc = new SpreadsheetEntry();
newDoc.setTitle(new PlainTextConstruct("new copy"));
newDoc.setId(template.getId());
service.insert(new URL("https://docs.google.com/feeds/default/private/full"), newDoc);

I get AuthenticationException: Token invalid. If I use https://docs.google.com/feeds/default/private/full to retrieve the document, it fails right there. So I guess docs.google.com/... requires some sort of higher privileges but how to obtain them?

  • 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-06-08T13:00:09+00:00Added an answer on June 8, 2026 at 1:00 pm

    I guess you can’t create documents with ClientLogin authentication model. Use Oauth.

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

Sidebar

Related Questions

I am trying to copy files from a directory that is in constant use
I'm trying to use boost::filesystem to copy files and folders (just like a standard
Basically I am trying to make a localized copy of an existing English msi
I am trying to use existing functionality which is embedded in a asp.net aspx
I am new to SVN, and I am trying to copy an existing project
I've been trying to get an existing project working on local copy but have
I'm trying to make a facebook app version of an existing page and am
I am trying to integrate iTextSharp into an existing Document Imaging application that allows
I'm trying to copy an image from the clipboard onto an existing image. Basically
I'm trying to use XPath/XSLT to add a node to an existing node that

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.