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 8195937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:18:35+00:00 2026-06-07T05:18:35+00:00

I am trying to create a new spreadsheet in Google docs without using the

  • 0

I am trying to create a new spreadsheet in Google docs without using the Zend library. I worked through the documentation and tried to follow the steps but now I am stuck. My code looks like this

    $curl = curl_init();

    $headers = array(
        "GData-Version: 3.0",
        "Authorization: GoogleLogin auth=" . $myToken,
        "Content-Length: 350",
        "Content-Type: application/atom+xml",
        "X-Upload-Content-Length: 0"
    );      

    $post_field = '<?xml version="1.0" encoding="UTF-8"?>
        <entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007">
        <category scheme="http://schemas.google.com/g/2005#kind"
            term="http://schemas.google.com/docs/2007#spreadsheet"/>
        <title>Mytitle</title>
        </entry>';

    curl_setopt($curl, CURLOPT_URL, 'https://docs.google.com/feeds/upload/create-session/default/private/full');
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_field);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); 
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);      

    $response = curl_exec($curl);
    curl_close($curl);

The token seems to be working fine since I am able to use it to retrieve data from google docs. What surprises me is that I don’t get a response from the API. While trying out different solutions I usually got an error message, but here the response string is empty.

  • 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-07T05:18:37+00:00Added an answer on June 7, 2026 at 5:18 am

    You are sending a request to initiate a resumable upload session (https://developers.google.com/gdata/docs/resumable_upload) but never send the actual content.

    Resumable upload is not needed when creating an empty file, instead send your request to https://docs.google.com/feeds/default/private/full

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

Sidebar

Related Questions

We can't seem to create a new spreadsheet per the Google Docs API. Our
I'm trying to create a new project using tomcat 7.0.27 + JSF 2.1.7 +
I am trying to create a new web application using PowerShell. I keep getting
I am trying to create a new library (.dll) for use in my SSIS
Ii'm trying to share a Google Spreadsheet using C#. Because the Google Data 3.0
I'm trying to create new application using BLToolkit but i can't compile the code,
I have a Spreadsheet, like excel on Google Docs. I am using both Mozilla
I've been trying to create new blog posts on my site using python and
Im trying to create new file on D: drive with c/c++ I found this
I am now trying to create new database manager under Fragment class. But unfortunately,

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.