Category: api

Google Data redirectUri required

In a piece of code where authentication/authorization for Youtube was done, I only setting the redirect_uri in the piece of code where the logging in was done, using createAuthUrl(). This value is the location to redirect to when the authorization is completed and the user is redirected back to the invoking website.

In subsequent requests, when attempting to upload a video, the Client was throwing errors. It was not immediately clear what was wrong, but it turns out that even for non-authentication requests the setRedirectUri() function must be specified for the API to work.

Leave a Comment