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.
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.
Related
I am writing a PHP CLI script that will upload videos to my Youtube channel. I created a project in Google Console, enabled Youtube API, enabled OAuth and received my client ID and secret. Then I generated a refresh token using https://developers.google.com/oauthplayground .
The authentication seems to work as I don't get any errors regarding that, but I get the following error:
"code": 403,
"message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e."
The credentials are for a new project where I didn't use anything from the quota.
Why do I get this error and how could I fix it?
I think you're right #GeorgeOlah. I didn't want to waste time setting up OAuth2 stuff, so I generated a key with the playground and then tried to use it with https://github.com/h2non/youtube-video-api.
I immediately got quota errors using the access token from the playground.
So I setup a token using https://github.com/google/google-api-nodejs-client/blob/1bcb74430143e498b9fd58cf2ca2b97da2ed3b07/samples/oauth2.js.
So far, I've had no quota errors with that token.
We are using the YouTube Data API to get the YouTube channel information, it was working before two days now it is giving me below error:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
Is there any new update on YouTube Data API?
Can anyone help me to resolve this issue?
In order to access any Google API you need to identify your application. This rule has not been enforced on all Google APIs. If you say your request has worked in the past I suspect that they have begun to enforce this now with the YouTube API.
The problem is that you have either not authenticate your application using Oauth2 or you are not sending an API key along with this request.
You need a Google Account to access the Google Developers Console, request an API key, and register your application.
Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
a. Go to the Developers Console and select the project that you just registered.
b. Open the API Library in the Google Developers Console. If prompted, select a project or create a new one. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.
see Getting started
I was getting the same error. The mistake I was making is not setting the API Key value while requesting. Please set the API Key attribute.
If you are using youtube data v3 api use following code snippet.
playlistItemsListByPlaylistIdRequest.setKey(YOUR_API_KEY_VALUE);
If you are using the Html request, then use following format :
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2CcontentDetails&maxResults=8&playlistId={PLAYLIST_ID}&key={YOUR_API_KEY}
According to:
https://cloud.google.com/speech/docs/common/auth
We can create an API key to a GCP resource (e.g. Google Maps, Speech, Translate) restricted by "iOS apps" to a particular bundle ID. In principle this is great, but how does GCP actually implement this? How does GCP determine the client's bundle ID since only the client is only making standard HTTP requests to GCP -- presumably it's not reporting its bundle ID in the header?
I'd like to enable this for an API key but don't want to suddenly shut down my iOS client because somehow it's not reporting its bundle ID.
I think Google Translation API just identifies your app by value in request header key x-ios-bundle-identifier.
I tried using Postman to send a successful request with following parameters.
GCP API Key config
Postman request
using of youube api getting this error
Error Domain=com.google.GDataServiceDomain Code=403 "The operation
couldn’t be completed. (com.google.GDataServiceDomain error 403.)"
UserInfo=0x7676020 {Error=NoLinkedYouTubeAccount,
error=NoLinkedYouTubeAccount}
You recieve this error since you are using Service account authentication.
The service account flow supports server-to-server interactions that do not access user information. However, the YouTube Data API does not support this flow. Since there is no way to link a Service Account to a YouTube account, attempts to authorize requests with this flow will generate a NoLinkedYouTubeAccount error.
https://developers.google.com/youtube/v3/guides/authentication
You may try to use another type of authentication, such as server-side or installed application, however user should allow to use his account.
If you want to create an app which will allow different users to add videos to your own channel, than you can try ClientLogin authentication protocol.
Look here for more info https://developers.google.com/youtube/2.0/developers_guide_protocol_clientlogin#ClientLogin_Authentication
This protocol is deprecated but I have not found any way to resolve problem.
I was reaching the youtube api quota limit while building my application so I added a developer key to the request and now I get a 403 error: Invalid Developer Key.
I've tried recreating my project and api key multiple times without any luck. I've tried adding the key to the URI as well as sending it in a header:
$c1 = curl_init($feedURL);
curl_setopt($c1, CURLOPT_HTTPHEADER, array(
'X-GData-Key: key=AIzaS...',
'GData-Version: 2'
));
My application is simple, all requested data is public, so I don't see a reason to use the Zend PHP Client.
You're using a v3 "API key" while querying v2 of the API.
v3 "API key"s are obtained from the Access tab of https://code.google.com/apis/console/ and are what you use to make non-authenticated requests to any of the APIs listed on that console.
v2 "developer key"s are obtained from http://code.google.com/apis/youtube/dashboard/ and is what you're looking for.
I believe that one of the goals is to retrofit v2 of the API to start supporting "API key"s from the API console, but that isn't something that's possible at this time.