Google API: YouTube video uplaod error = 403

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 09:11:18

问题


I'm getting following error for uploading the video to youtube,

YouTube-API-Demo[654:60b] Video Upload failed : Error Domain=com.google.GTLJSONRPCErrorDomain Code=403 "The operation couldn’t be completed. (Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.)" UserInfo=0x16e922e0 {error=Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration., GTLStructuredError=GTLErrorObject 0x16daee10: {message:"Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration." code:403 data:[1]}, NSLocalizedFailureReason=(Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.)}

Please help me in resolving the issue.


回答1:


Have you enabled the Youtube Data API for the App that you are using? https://console.developers.google.com/project

You see a list of projects there and you have to active the APIs per project.

Otherwise there might be IP restrictions. You can restrict your App Token to only allow access for specific IPS. The default is "allow all IPs". There is a "Access" Tab somewhere.



来源:https://stackoverflow.com/questions/28041299/google-api-youtube-video-uplaod-error-403

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!