Wednesday, April 18, 2012

[YouTube-API] Re: Resumable upload using OAuth sometimes gets 401 on last PUT

Hello AJ,

Chances are that it's OAuth 1, yes. The problem with OAuth 1 is that
it involves signing the request, and the signed request includes a
timestamp to prevent replay attacks. And that timestamp introduces
another way that a request could fail if the auth information is
processed X number of minutes after the uploads begins.

It's really not a great situation, and I'll continue to try to get
the right folks to resolve the issue internally.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Apr 16, 5:57 pm, AJG <ajgreg...@gmail.com> wrote:
> I'm using older gdata java code so isn't that OAuth 1?
>
> The uploads are under an hour I don't think this is it.
>
> -Aj
>
>
>
>
>
>
>
> On Monday, April 16, 2012 2:52:06 PM UTC-7, Jeffrey Posnick wrote:
>
> > Hello AJ,
>
> >  OAuth 2 access tokens expire after 1 hour, at which point you need to
> > use a refresh token to obtain a new access token. If your uploads
> > normally take under an hour to complete, you could explicitly refresh
> > your access token right before starting the upload to mitigate the
> > chance you'll run into expirations.
>
> >  This is not a great workaround, though, and I'm continuing to follow
> > up internally to see if we can just get the underlying issue resolved,
> > so that auth tokens only need to be valid when the upload starts, not
> > when it completes.
>
> > Cheers,
> > -Jeff Posnick, YouTube API Team
> > groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
> > @YouTubeDev
>
> > On Apr 10, 11:25 am, AJG <ajgreg...@gmail.com> wrote:
> > > Thanks Jeff.  You are right about the POST.  We went to Direct Upload
> > and
> > > now see some "Unauthorized" results after the POST as well.
>
> > > You say it depends on when the auth token expires.  How long is that
> > > usually?
>
> > > Thanks,
> > > -Aj
>
> > > On Tuesday, April 10, 2012 5:51:00 AM UTC-7, Jeffrey Posnick wrote:
>
> > > > Hello AJ,
>
> > > >  The issue will be addressed at our end, so that auth tokens only need
> > > > to be valid when the upload begins, not when the upload completes. I
> > > > don't have an exact timeframe for when the fix will be developed,
> > > > though.
>
> > > >  Note that this could still be a problem if you're doing one large
> > > > POST (i.e. a Direct Upload). It depends on the timing of when your
> > > > auth tokens expire.
>
> > > > Cheers,
> > > > -Jeff Posnick, YouTube API Team
> > > > groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
> > > > @YouTubeDev
>
> > > > On Apr 5, 5:19 pm, AJG <ajgreg...@gmail.com> wrote:
> > > > > Do you have any more info about this?  I need to know if we should
> > stop
> > > > > using the resumable calls and go back to one big POST.
>
> > > > > Thanks,
> > > > > -Aj

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment