0

Im getting the below error while uploading the video to you tube.

exception 'Google_ServiceException' with message 'Error calling POST
https://www.googleapis.com/upload/youtube/v3/videos?part=snippet%2Cstatus&uploadType=multipart&key=AIzaSyCfF7aL8R9qBbXTfl-TkdwcypMfWtPbtOI:
(403) 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 API key configuration if
request from this IP or referer should be allowed.' in
/home/acealgos/public_html/demo/maid/app/webroot/youtube_upload/google-api-php-client/src/io/Google_REST.php:66
Stack trace: #0
/home/acealgos/public_html/demo/maid/app/webroot/youtube_upload/google-api-php-client/src/io/Google_REST.php(36):
Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1/home/acealgos/public_html/demo/maid/app/webroot/youtube_upload/google-api-php-client/src/service/Google_ServiceResource.php(186):
Google_REST::execute(Object(Google_HttpRequest)) #2
/home/acealgos/public_html/demo/maid/app/webroot/youtube_upload/google-api-php-client/src/contrib/Google_YouTubeService.php(887):
Google_ServiceResource->__call('insert', Array) #3 /home/acealgos/public_html/demo/maid/app/webroot/youtube_upload/index.php(73):
Google_VideosServiceResource->insert('snippet,status',
Object(Google_Video), Array) #4 {main}

In google developer console below api's are enabled

BigQuery API        
Debuglet Controller API     
Google Cloud SQL            
Google Cloud Storage JSON API           
YouTube Analytics API           
YouTube Data API v3

which api should enable to resolve the issue.

1 Answer 1

1

if we read this msg :

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 API key configuration if request from this IP or referer should be allowed.

Haven't you moved the project to another host, or are you working in another comp, As I know google Api gives an api key related to the host you're working in, so in your case, you have to go to the regenerate a newer key!

Sign up to request clarification or add additional context in comments.

2 Comments

I have the same host only.
so u've to regenerate a new key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.