0

I'm newbie in Youtube API and I trying upload a video by NodeJS, but is returning this error.

<errors xmlns='http://schemas.google.com/g/2005'>
  <error>
    <domain>GData</domain>
    <code>ServiceForbiddenException</code>
    <internalReason>Currently authenticated user does not have write access to username: "marlos"'s videos.</internalReason>
  </error>
 </errors>

What I have do for resolve this problem?

Marlos Carmo
  • 974
  • 1
  • 8
  • 13

2 Answers2

3

The correct way to handle uploads is to use the username "default" when constructing your upload URL, as described at

https://developers.google.com/youtube/2.0/developers_guide_protocol_direct_uploading

This will ensure that the upload goes into the account associated with the current authorization token.

There's sample code to do this using the .NET client library available at

https://developers.google.com/youtube/2.0/developers_guide_dotnet#Direct_Upload

Juned Ahsan
  • 66,028
  • 11
  • 91
  • 129
2

Please follow the link below for code and please add your own DEVELOPER_KEY & CLIENT_ID. In this i referred the code from http://urinieto.com/2010/10/upload-videos-to-youtube-with-iphone-custom-app/ and has fixed all issue in it. Now this code is fully working.

Code Link

https://github.com/surajwebo/YouTubeUploadVideo/archive/master.zip

Suraj Mirajkar
  • 1,404
  • 10
  • 23
  • Undefined symbols for architecture i386: “_OBJC_CLASS_$_GDataOAuthAuthentication”, referenced from: objc-class-ref in GDataOAuthViewControllerTouch.o “_OBJC_CLASS_$_GDataOAuthSignIn”, referenced from: objc-class-ref in GDataOAuthViewControllerTouch.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) These errors how u solved...? @Suraj Mirajkar – Himanshu Jul 08 '13 at 11:47
  • Rajkumar i removed GDataOAuthViewControllerTouch.m from Targets -> Build Phases -> Compile Sources and added @class GDataOAuthAuthentication; in GDataOAuthViewControllerTouch.h file. If you are using Arc architecture than set -fno-objc-arc for GData client files. – Suraj Mirajkar Jul 08 '13 at 11:58
  • @ Suraj Mirajkar Thanq dear.Its worked.I ll go for further things.If I have doubt can I catch u again ? – Himanshu Jul 08 '13 at 12:04
  • For GDataHTTPUploadFetcher , GDataProgressMonitorInputStream duplicate interface definition is getting. @suraj Mirjakar – Himanshu Jul 08 '13 at 12:38
  • Hi @Rajkumar have you tried Code Link above. i have resolved all errors in it. – Suraj Mirajkar Jul 09 '13 at 06:19
  • Your code link working fine. When Im integrated that in my project, Its getting errors. @Suraj Mirajkar – Himanshu Jul 09 '13 at 07:35
  • Hi @Rajkumar follow below links: http://stackoverflow.com/questions/3911941/duplicate-interface-declaration-for-class-foo http://stackoverflow.com/questions/6188744/duplication-of-interface-error-in-xcode http://stackoverflow.com/questions/12415720/getting-duplicate-interface-definition-error-definitely-has-to-import-ing-he – Suraj Mirajkar Jul 09 '13 at 11:46