YouTube Data API v3 quota exceeded on the first upload - java

I am trying to develop a desktop application in Java for uploading videos. I create a new Google account, create project on developer console and create credentials (ClientID and ClientSecret). After creating all of these, i do authorization (as in java examples), the application opens browser window for me to allow the application to manage the channel, and everything works fine.
But when i try to upload a video (short video, tried it on other channels before and it uploaded every time), i immediately get quota exceeded response. And in the developer console i can see that quota is actually exceeded (9644 queries already). I must add that this is happening only for the newly registered accounts - the same video uploads without issues using the same app.
Why is this happening? Is there any way I can "register" new account and immediately do upload? If not, how can I do this properly? Thanks

I had a similar problem with the python code that i used (i modified code based on https://developers.google.com/youtube/v3/guides/uploading_a_video). I solved it using the following workflow:
create a (new) google account if you dont have one yet
go to youtube, sign up with the google account and create a channel
go to
https://console.developers.google.com/apis/credentials?pli=1
create a project, pick a name
click on OAuth consent screen, pick external, pick application name
go back to Credentials, create Credentials using OAuthClient ID, pick Web application
pick a name, put into redirect urls: http://localhost:8080/ and https://developers.google.com/oauthplayground and save
go to Dashboard, search YouTube Data API v3 and enable
then go to https://developers.google.com/oauthplayground/
click on the rack wheel on the right, click use your own credentials, copy and past clientID and secret client from https://console.developers.google.com/apis/credentials and close
search for Youtube Data API v3 on the left, and select https://www.googleapis.com/auth/youtube.upload and https://www.googleapis.com/auth/youtube
click authorize APIs, log into your account, agree to all questions asked
Click Exchange authorization code for token
the Request on the right should not give you any errors
go back to https://console.developers.google.com/apis/credentials, when you click on the edit button next to your credentials, you should be able to download your JSON files. put them into the script folder under client_secrets.json
make sure to delete the file python_upload_video.py-oauth2.json from previous trys
when running the code with for example
python upload_video.py --file="input.mp4" --privacyStatus="unlisted"
the browser should open and ask you to log into your account
what i noticed is that:
if you get three errors in three hours it seems to exceed the quota and you cannot continue
the upload works for about 5 videos a day. If you need to upload more and cannot wait the only way is to create a new account and repeat the steps above (as far as I know)

It may be worth investigating further: I guess that your issue has to do with the API issues seen since about three days now. See the answer https://stackoverflow.com/a/55220182/8327971; also Google's known and acknowledged issue: https://issuetracker.google.com/issues/128673552.

Related

Google action fulfillment url (with my own java server)

I'm trying to play with Google Home Action. I've created a new project, give it a name, then have to put a fulfillment url.
I've already implemented a small server (in Java, by using the class HttpsServer) to control a connected object in my house (it's already worked, I can send action to it by invoking a url, when I'm connected from my WIFI or outside of my home network with my 4G smartphone). The url is something like https://xxx.xxx.xxx.xxx:8080/my_object?action=test
So I've just tried to add a new "google" context to my server to do some "google action" when invoking via url https://xxx.xxx.xxx.xxx:8080/google. For now with this url, I just reply with a "OK google" string in a 200 answer and also display it locally on my console output. When invoking myself, it just display the string (by invoking it from my 4G connection).
Naively I think I just have to put my https://xxx.xxx.xxx.xxx:8080/google inside the fulfillment input box into the Google Action... and bim I will just have to understand the requests sent by Google (manage authentication, etc) to my tiny server. But when trying to invoke it via the simulator, my server is not triggered.
I must have missed something, but what?
If someone can help me, or put me to the correct direction, it would be great.
Regards
Just to resume:
Google Home Action accept only HTTPS fulfilement url.
And the https server must not use a self signed certificate.
Even with that, it never triger anything to my personal server (I've written to Google Support, answer me that tey will look... but after 1 week, problem is not solved).
My solution:
I just create an account on IFTTT, associate it to my google home account, and create a simple "applet" with if (select google assistant, input sentence I have to say), then (select webook, put the url of my server with the correct parameter in it)... save... it publish it to my google home assistant (how? I don't know and don't care)... try.. it works!
Don't know why Google do not provide something as simple as IFTTT to work with their assistant.

Application shows this warning (This app isn't verified)

I have developed an web application using google app engine.
Application shows this warning screen (This app isn't verified) when I try to connect with Google OAuth.
enter image description here
Please note that I have already submit this form : https://support.google.com/...
and I have follow this steps : https://support.google.com/...
i want to resolve this warning
Can't view the two links (assuming they're pointing to the conversations). From the screenshot seems like the app registered with Google to use the auth token and key needs to be validated first (I know this sounds obvious...). If the 'app' is not yet live then still you might need to first use sandbox details to develop it.

This app isn't verified This app hasn't been verified by Google yet. Only proceed if you know and trust the developer

Hi I have developed an web application using google app engine, for google shared domain contact, Its working fine when I am running it in the localhost but when I deploy that application into google app engine it showing warning screen before user conforming for consent(as shown in the image).
I am using 2 scope http://www.google.com/m8/feeds/contacts/ and https://www.googleapis.com/auth/userinfo.email. when I try to add a user information in the google shared contact I am getting a exception message as www.google.com. How can I resolve the problem? am i need to verify my application in the oauth_app_verification. Can any one solve this?
Thank you.,
You need to go through the verification process before you launch your app. This new process came recently to protect user's data. You can start the verification by submitting this form but before it is recommended to follow steps here

How to Hide/ByPass Authoriaztion Pop Up while accessing Google Drive API

I am using Google Drive API's using JAVA for getting drive files, i want to create a background job which will fetch the google drive files
without any user interaction (eg asking for user to explicity Authorize).
In the example given below by google, after running this java program we need to explicitly hit URL in browser & click on Authorize
for full execution of the program.
https://developers.google.com/drive/v3/web/quickstart/java
Using the Service Account I am able to fetch the google drive contents without any kind of user action (eg click on allow to authorize).
I want to acheive the same flow for individual user accounts, I have the list of emailid and passowords for google accounts.
Other than service accounts, is there any method so that i connect to the authorization url in background using HTTPPost request and
fetch the file list.
I don't think there's another way of doing this aside from Service Accounts which you are currently using. You can try to use the Google Playground but this is for testing purposes only and not for production.

Android License Test Response - Never works

I've been working on an Android App that has already been published to Google Play. For the next update (versionCode = 3) my client wants to include the LVL licensing scheme.
The first thing I did was set up a static test response from the licensing server. I set the test response to LICENSED. After reading this in the documentation:
This License Test Response will be sent to devices using [my email address]
or the Test Accounts listed above for applications you have uploaded to Google Play. >Additionally, this account (but not the Test Accounts) will receive this response for >applications that have not yet been uploaded to Google Play.
I thought, not a problem, since my developer account email is the same as my Google Play account email on my testing devices. So I should receive the test response when debugging the App.
After that, I read through all the other licensing documentation and sample code and integrated it into the App. I used a ServerManagedPolicy with the correct base64 public key and 20 random generated bytes as the salt.
Once everything looked good I uploaded it to the device to test it, but instead of receiving the LICENSED response that I expected, I am always receiving a NOT_LICENSED response. I went back and made sure that:
I was connected to the internet.
I was signed in to my developer account on Google Play.
The LicenseChecker was using the correct public key.
Clearing my Google Play cache.
At first, I thought maybe it had something to do with the caching, so I tried using a StrictPolicy instead. Same response. Since I haven't purchased the App from the store, I'm under the impression that the licensing server is responding normally instead of sending the static test response. Here are some other things I have tried:
Waiting 24 hours and trying again.
Tried building the App with the android debug key, as well as the current distribution key.
Setting up and using a different test user account on Google Play. I made sure to add this email account to the 'Test accounts' section in the developer console.
Uploading the APK to Google Play, but not publishing it.
Incrementing the versionCode from 2 to 3. This is interesting, because instead of responding NOT_LICENSED it returns the 'application error code' ERROR_NOT_MARKET_MANAGED.
This leads me to believe that the license server is always responding normally, instead of sending the static test response I set up to my developer account. I have a feeling it may be because the App is already published, but I cannot risk publishing a debug build just to test wether or not it is working.
Has anyone been in this situation before? Any help is greatly appreciated.
I had the same issue but was able to resolve it. Here are the things I did to fix:
1) on my device, I removed all google accounts except the test account I had configured for. Apparently, play store was still trying to use a non testing account.
2) I had to activate test status for my developer account even though I'm the main developer and only tester.
the version increment thing did not help and honestly was a distraction.....
I've spent hours and even days with the same problem, it is documented here and elsewhere, that pre-published license test is hit and miss, and more miss than hit from what I discovered.
The only way I've found to make it work "more reliably" (but still not totally reliable) is to have a hardware device that is a reset to factory defaults, then set it's PRIMARY google user as the same one as your dev account that has the app uploaded to test with.
The special AVDs are also not very reliable.
I have the same problem when testing using LVL library. I always get the 561 (0x231 NOT_LICENSED) response no matter what I set the License Test Response to in the settings page.
My paid app users don't seem to complain so I'm assuming LVL is working for them.
At first one of my apps had this problem and it went away after 1 day (published Dec 30 2012), now I get valid test response in that app.
However, I still get the 561 (0x231 NOT_LICENSED) response for a newer app (published Jan 31 2013)
So now I just comment out (disable the alert dialog code that pops up for 561) after I publish the APK and continue my development for the next release.
I un-comment (enable the alert dialog code) before I publish again!
I contacted Google Play, they referred me to their developer forums. I posted the same question there but then I can't find my post.
Good to know that I'm not the only one facing this problem.
Not sure I am adding anything new but having similar problems and frustrations at what-should-be-happening vs what-is-happening I'll offer up this which seemed to work: 1) remove all of the users in the Play Console's license testing list of users; 2) whatever device you are testing remove all of the Google accounts; 3) on that same device create a new, unique Google account (e.g., iamalicensetester#gmail.com); 4) add that Google account to the Play Console license testing list of users.
What I think might be happening is that if you have more than one account on a device and one of them is licensed then a non-licensed account of that same device (or other devices) will inherit that characteristic. This idea of mine is just a model (all models are wrong, but some are useful) to (mostly) allow me to get back to the work of testing...and (partially) to have some way to explain this nonsense to myself.
I did try most of the things mentioned above...clearing the cache, the storage, etc. -- you'd think that Google would want a better facility with dashboarding but don't know if that is even on their radar. I mean, revenue, right?

Categories