Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

How to fix YouTube API Error 401: Expected OAuth 2 access token

$
0
0

I've been using youtubeuploader for several years without issue. Two days ago it failed with the following error:

Error making YouTube API call: Post "https://www.googleapis.com/upload/youtube/v3/videos?alt=json&notifySubscribers=true&part=snippet&part=status&part=recordingDetails&prettyPrint=false&uploadType=multipart": oauth2: cannot fetch token: 400 Bad Request

I fixed that by creating a new request.token. That worked fine. For one day.

Today I get a different error which I can't figure out how to fix. Since I had changed nothing since yesterday, I can't figure out what triggered this new error:

 Error making YouTube API call: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

When I look at the dev console, everything seems in order. The request.token begins with:

"access_token": "ya29.

Which seems to be correct.

What do I need to do to fix this?

Note that I am not very good at this sort of thing; especially since I've gotten old and a lot less smart than I used to be. My apologies in advance.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>