I am building a simple script which polls some data and then updates a spreadsheet that I am giving to my client. (It is a small project and I don't need anything fancy.)
So I created a Google Cloud project, enabled the Sheets API, and got a credential for a Desktop app. When I try to run the quickstart sample, I get an error:
Access blocked: <my project name> has not completed the Google verification process
I have tried googling and all the solutions seem to be oriented toward what a user should do if they see this, but I am the developer. I only need to grant my own self access to this spreadsheet, since my script is the only thing that will be changing it (I will also share it with the client).
What do I do?
You need to add the account as a test user under the OAuth consent screen:
1.) From the dashboard go to APIs & Services and click OAuth concent screen
2.) Under the Test users, click +Add Users. A menu will prompt on the right panel.
3.) Input the users email
4.) Reload the URL provided.
Reference: https://www.youtube.com/watch?v=bkZns_VOB6I
Note: I am not affiliated with the video nor the owner of the youtube channel
Related
Never done this but, I'm trying to build a program, that would scrape a google classroom site specific to the user that's logged in. Even when logged in the main browser google denies the request and instead gives me authentication error (I need to login in other words) how can I be logged in, in the program so that google accepts my request and grants me to scrape classroom sites.
Tried this solution but without luck: Logging into Google using Python
It was published a while ago and google could have changed the requirements for these kind of program authentication.
What I desire is to get into the section only available for me when I'm logged in, e.g. content of my classroom and grab some text from it, is it even possible?
It would be expensive to try and implement a log-in mechanism, especially with all the 2FA requirements of Google solutions today.
What would be quicker and usually works in software automation today is to have a manually logged in session and then start the browser with the user data directory pointed to it. This is how it's usually achieved and the relogin is done manually from time to time, only when needed. More info on how to set up a user data directory here.
This gets you up and running pretty fast.
I am looking into using the Google API to allow users to create/ edit calendar entries in a company calendar (Google calendar) from within iCal.
I'm following the instructions at: https://developers.google.com/api-client-library/python/auth/web-app
Step 2 says that I will need the application's client ID and client secret. I can see the client ID in the 'Credentials' page for my app, but I have no idea what the client secret is or where I get that from- anyone know what this is? How do I download it? Where can I get the value from to update the field?
Go to credentials tab. Client IDs will be listed there. In the right, there is an option to download it (.json file)
If you go to your Google developers console you should see a section titled OAuth 2.0 client IDs. Click on an entry in that list, and you will see a number of fields, including Client secret.
If you have not yet created credentials, click the Create credentials button, and follow the instructions to create new credentials, and then follow the steps outlined above to find the Client secret.
I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier.
When I click the Duplicate Application button, I get this error: "The developer does not own the app id being forked".
Further research indicates that this seems to be a bug, but that a workaround is to send an email invitation to the other email addresses in my Google account to add them.
I am able to send those emails from the Permissions screen by clicking a button and inserting the email address. When I click link in the email that is sent, it opens My Applications, listing all my apps, instead of a confirmation that my response. It appears to open the wrong page.
In the Permissions page, the email address still shows Pending after about 10 hours.
Is there a simple way to duplicate an application?
Do you have more than one google account? I have found that app engine does unexpected things when you are logged into more than one google account at a time.
I suggest logging into only a single google account and trying the operations again.
You could create a new application, use Datastore Admin to copy your entities to the new application's Datastore, then re-deploy your application. Is there anything else that needs duplicating?
I want to use Google API to track the number of tweets a particular website (say Rbloggers) make each day. And I am trying to do it in Python.
I am completely new to this. So, I was looking at the hello-analytics-api, in which I need to deal with OAuth 2.0. And I have no idea what to put down for the redirect URI.
I have read
What's a redirect URI? how does it apply to iOS app for OAuth2.0?
But I still don't quite understand the concepts and what I should put down for the 'redirect URI' ?
From Choosing a redirect URI
When you create a client ID in the Google Developers Console, two redirect_uris are created for you: urn:ietf:wg:oauth:2.0:oob and http://localhost. The value your application uses determines how the authorization code is returned to your application.
In case of desktop apps or programs, you should set it to urn:ietf:wg:oauth:2.0:oob so that you will be redirected to the page where you can copy the authorization code from internet browser and paste it in your desktop app
I've managed to implement the simpleauth package for a basic webapp I've been working on. I now need to send data to this service from a python script running on a Raspberry Pi (the app is a "data logger" for temperature). Before I had implemented the simpleauth package, I could just POST the data and username to the site. Alas, now the response is the login page (to be expected).
If I wanted to connect to this webapp from the command line, I assume I'll need to authenticate myself. However, how would I go about doing this? I assume I'm going to need to programmatically replicate the steps taken by the browser to get a token but I think I've tried this and it hasn't worked. I'm not even sure who my token provider is - my webapp, or Google?
Any tips?
If you're trying to authenticate on an installed or console app, you need to use urn:ietf:wg:oauth:2.0:oob as the redirect_uri GET param in when you redirect the user to the login/authorization page. Once your app has been authorized, they'll be presented with a valid OAuth 2.0 code in a text box that they'll have to copy/paste into your app. Once they do that, then your app must follow the rest of the usual server-side flow (code for token exchange, etc.).