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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:05:15+00:00 2026-06-13T07:05:15+00:00

I was woking on YouTube Resumable Uploads: https://developers.google.com/youtube/2.0/developers_guide_protocol_resumable_uploads#Sending_a_Resumable_Upload_API_Request I failed to create a request

  • 0

I was woking on YouTube Resumable Uploads:
https://developers.google.com/youtube/2.0/developers_guide_protocol_resumable_uploads#Sending_a_Resumable_Upload_API_Request

I failed to create a request with ASIHttpRequest like the following.
How to make it work? Thanks! Any help will be appreciated!

(1)

POST /resumable/feeds/api/users/default/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=adf15ee97731bca89da876c...a8dc
Content-Length: 0
Slug: my_file.mp4

(2)

POST /resumable/feeds/api/users/default/uploads HTTP/1.1

Host: uploads.gdata.youtube.com

Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=adf15ee97731bca89da876c...a8dc
Content-Length: 1941255
Slug: my_file.mp4
Content-Type: application/atom+xml; charset=UTF-8

<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom"
  xmlns:media="http://search.yahoo.com/mrss/"
  xmlns:yt="http://gdata.youtube.com/schemas/2007">
  <media:group>
    <media:title type="plain">Bad Wedding Toast</media:title>
    <media:description type="plain">
      I gave a bad toast at my friend's wedding.
    </media:description>
    <media:category
      scheme="http://gdata.youtube.com/schemas/2007/categories.cat">People
    </media:category>
    <media:keywords>toast, wedding</media:keywords>
  </media:group>
</entry>

Here is my code for the (2) ,the request finished without error, but the responseData is empty.I don’t know why!

    NSURL *uploadUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://uploads.gdata.youtube.com/resumable/feeds/api/users/default/uploads"]];
    ASIFormDataRequest *theRequest = [ASIFormDataRequest requestWithURL:uploadUrl];

    NSString *xmlStr = [NSString stringWithFormat:@"<?xml version=\"1.0\"?>\n"
                        @"<entry xmlns=\"http://www.w3.org/2005/Atom\"\n"
                        @"xmlns:media=\"http://search.yahoo.com/mrss/\"\n"
                        @"xmlns:yt=\"http://gdata.youtube.com/schemas/2007\">\n"
                        @"<media:group>\n"

                        //Title
                        @"<media:title type=\"plain\">%@</media:title>\n"
                        //Description
                        @"<media:description type=\"plain\">\n"
                        @"%@\n"
                        @"</media:description>\n"
                        //Category
                        @"<media:category\n"
                        @"scheme=\"http://gdata.youtube.com/schemas/2007/categories.cat\">Entertainment\n"
                        @"</media:category>\n"
                        //Keywords
                        @"<media:keywords>Camera,PowerCam</media:keywords>\n"

                        @"</media:group>\n"
                        @"</entry>\n",        @"PowerCam.mov",@"description" ];


    [theRequest setTimeOutSeconds:60];
    [theRequest addRequestHeader:@"Authorization"   value:[NSString stringWithFormat:@"Bearer %@",_oauth.accessToken]];
    [theRequest addRequestHeader:@"GData-Version"   value:@"2"];
    [theRequest addRequestHeader:@"X-GData-Key"     value:[NSString stringWithFormat:@"key=%@", YouTuDevkey]];
    [theRequest addRequestHeader:@"Content-Length"  value:[NSString stringWithFormat:@"%d",xmlStr.length]];
    [theRequest addRequestHeader:@"Slug"            value:@"PowerCam.mov"];  
    [theRequest addRequestHeader:@"Content-Type"    value:@"application/atom+xml; charset=UTF-8"];

    [theRequest appendPostData:[xmlStr dataUsingEncoding:NSUTF8StringEncoding]];
    [theRequest setUploadProgressDelegate:self];
    theRequest.delegate = self;
    theRequest.tag = eWSKYouTubeSharerUploadingVideoMetadata;
    self.requestTag = eWSKYouTubeSharerUploadingVideoMetadata;
    self.request = theRequest;
    [[ASIManager manager] addRequest:theRequest];
    [[ASIManager manager] startQueue];
  • 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-13T07:05:16+00:00Added an answer on June 13, 2026 at 7:05 am

    The example below shows a sample API response to a request to upload video metadata for a resumable upload:

    HTTP/1.1 200 OK
    Location: http://uploads.gdata.youtube.com/resumableupload/AF8GKF...0Glpk0Aw
    Date: Fri, 04 Dec 2009 16:14:30 GMT
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Content-Length: 0
    Content-Type: text/html
    

    The code works fine. The “Location” url is in the headers, not in the body, so the responseData is empty:)

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

Sidebar

Related Questions

According to YouTube's docs: https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists I can go to the following URL to retrieve
I'm working with Youtube API and PHP library: http://code.google.com/apis/youtube/2.0/developers_guide_php.html I'm modifying existing app: http://googlecodesamples.com/youtube/php/YouTubeVideoApp/index.php
I am currently working on implementing a like button, following the tutorial on http://www.youtube.com/watch?v=GG-kCSx0taU&feature=related
i'm working with the youtube json from google-api-client : { apiVersion: 2.0, data: {
Okay, so I have a php variable which stores: http://gdata.youtube.com/feeds/api/videos/gzDS-Kfd5XQ?v=2&alt=json-in-script&callback=youtubeFeedCallback This is working fine
I'm trying to create a simple youtube player using some javascript. Example is here:
I'm trying to install YouTube plugin as per instructions: ./script/plugin install git://github.com/vibha/youtube-model.git But I
<items> <item> <pastor> Master Jojimon</pastor> <video> youtube.com/embed/X_nJ7So9y04 </video> <name>Message by Master Jojimon</name> <lan>english</lan> I
youtube url is not working in javascript,why? where is the mistake in my code:
I'm working on a project which needs to use youtube api. The html and

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.