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

Youtube API Statuscode 403 "The caller does not have the permission" even tho I have the permission

$
0
0

I use the YouTube API to set a video thumbnail on an hourly bases with a cronjob. Most of the time it is working flawlessly - the thumbnail is set properly. But there are some hours of the day where i get this response:

"error": {"code": 403,"message": "The caller does not have permission","errors": [      {"message": "The caller does not have permission","domain": "global","reason": "forbidden"      }    ],"status": "PERMISSION_DENIED"  }}

The code im using to is the PHP sample from YouTube - OAuth:https://developers.google.com/youtube/v3/docs/thumbnails/set?hl=en

It's super strange because it's pretty much 7 hours each day where it's not working.The usage is below the API threshold as you can see here: (the red line are the maximum allowed queries per day)enter image description here

But the weirdest part is - if i check the usage of the API through YT Console i can clearly see that something is not working. See the spickes in the chart below. Each spike has nearly the exact same duration. It's exactly the timeframe when i get the error response above.enter image description here

I should also point out that I use this on a YT Brand account. I tried to set this up on a new VM with new Domain, new auth token - nothing works. What drives me crazy is the fact that the script runs for about 17 hours a day, but then suddenly the error message comes. So it doesn't make sense to me.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



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