duck (CyberDuck CLI) with google drive - google-drive-api

I'm trying to get the Cyberduck CLI (duck.sh) to work interfacing with a google drive (not "Google Cloud Storage") and I'm having problems getting the oAuth authorization to work. I found this thread but it's out of date - as the newer versions of Cyberduck do absolutely work with Google Drive. Using the regular cyberduck GUI I can browse and operate on my G-drive instance, but I can't quite quack the code (sorry!) for how to make this work using the CLI.
[lwobker:~]$ duck -l googledrive://<user>#gmail.com/
Authenticating as <user>…
OAuth2 Authentication. Paste the authentication code from your web browser.
Authentication Code: <pasted pass here>
Save password (y/n): n
Disconnecting www.googleapis.com…
Login failed. Malformed auth code. Please contact your web hosting service provider for assistance.
I've tried a number of different URLs, including:
#gmail.com
me#gmail.com#www.googleapis.com
and a couple of others.
I also can't seem to figure out where the GUI version of cyberduck stores it's authorized credentials... if I could re-use those that would be fine, doing a one-time setup at the beginning doesn't break my use case.
I'm somewhat familiar with the Google Developers API, and I've created one for use with this project, but I can't seem to figure out how the Google "Client ID" and other credentials map to the Cyberduck tool.

Make sure you paste the auth code obtained from the Google login page opened exactly as is without any line breaks. More information is available in the wiki.

Related

Manifest V3 Policy Question - Is this loading a configuration or building an interpreter?

The newest Manifest V3 policy for Google Chrome states the following:
Building an interpreter to run complex commands fetched from a remote
source, even if those commands are fetched as data
I am building a Google Chrome plug in that helps automate logging in for our enterprise users. Sometimes, the websites we support change their layouts or their login flows. When we detect this scenario, I want to be able to send an updated configuration to our extension from our servers so that our extension is aware of the new steps to execute to login.
Would this general flow be a violation of the above policy?
Appreciate any feedback on this!
Best,
Cerby Extensions

how to add google accouts package to my site built using telescope and meteor

Telescope allows to choose the only three Authentication Methods from admin settings panel. The three methods are through email/password, facebook, twitter. I would like to add google to the authentication methods.
My local copy of the sites folder has been deleted, otherwise I could have used the command "meteor add accounts-google" in terminal. I also tried executing the same command in the console, but its showing errors.
It would be helpful if any one could suggest adding google account as an authentication method.
You deleted your development copy of the site? That's a problem. You're going to need a local development environment to make changes to the app and redeploy.
meteor add accounts-google and a redeploy is your solution.

Google Compute Engine (GCE) email delivery solution HOW TO?

I have a project uploaded on google cloud and on that project whenever some one registers he gets an email saying "welcome".
When this project was hosted on a web server(not google cloud server) it was working fine and emails would go on registration.
But since the project has been moved to google cloud the email services have stopped.All the other functionalities are working fine.
IS there something iam missing out ,or does google want us to get a email domain from google.
coding language- cake php
database - Mysql
I have already unblocked ports 25,587,465 ,but that also did not resolve the issue
Please advise and help.
I think you may have to use SendGrid to use other email than gmail.
As describe in this document:
https://developers.google.com/compute/docs/sending-mail
There are examples listed there as well.
I deployed a relay outside of GCE and configured it to listen on TCP/588 (non standard SMTP port) and then configured all of my GCE instances to relay to that host over TCP/588. That's been working great for months now.

Google Drive upload from webserver

I'm trying to make a service that runs on a webserver and can upload files to Google Drive,
so that people can sync the files to local-drive using the Google desktop application.
So I tried the Drive API but it requires a webbrowser to authenticate.
This would be a possibility, but I don't know to get the access token programmically.
Even if I had the access token, I wouldn't know if it just works forever.. It seems to have an expire date?
I wouldn't want the service to suddenly not working, because the token has expired.
Than I learned about Service Account, and finally got it working, but it seems to have its own space that i can only access with the service account.
I don't know how to share the files from the service account to a regular account, as people need to sync it locally.
So a found a video about user impersonation, in which he showed a page about given access to a service account to impersonate another user.
But i don't know where to find this page.
Looking at: http://support.google.com/a/bin/answer.py?hl=en&answer=162106&topic=2759255&ctx=topic
It says it's in Advanced Tools > Manage third party OAuth client access (under the Authentication section).
But where is the Authentication section? Do I need to create a Google App to do this?
The question is: How upload files programmically to Google Drive without any user intervention, so that they can be synced locally with the drive desktop-application.

Can I authenticate with Google username and password in Google Drive API?

Can I authenticate with just Google account username and password instead of using OAuth? If not, is it planned to support this kind of authentication in the future versions of Google Drive API?
I am currently using Google Documents List API which allows to authenticate with just username and password. So I am wondering if I can I do the same thing with Google Drive API.
Are there any reasons you cannot use OAuth 2.0 as your authorization mechanism?
Client Login is currently being deprecated and it would be better for you and your users to use OAuth 2.0.
There are multiple code samples available in the Drive SDK documentation as well as in the various client libraries project page to help you get started.
If you are running a server application, consider using a service account with OAuth2 and the Drive API. This will allow you to run the app on a server without a user having to provide OAuth2 credentials on the console or through a UI. You can also do impersonation if you want your app to act on documents with a specific account.
GoogleCredentials credentials = new GoogleCredential.Builder()
.setTransport(HTTP_TRANSPORT)
.setJsonFactory(JSON_FACTORY)
.setServiceAccountId("[[SERVICE_ACCOUNT_EMAIL]]")
.setServiceAccountScopes(DriveScopes.DRIVE, DriveScopes.DRIVE_FILE,
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile")
.setServiceAccountPrivateKeyFromP12File(Auth.keyFile)
.setServiceAccountUser("[[impersonateduser#domain]]")
.build();
credentials.refreshToken();
I've found this blog post somewhere (possibly here): http://blog.databigbang.com/automated-browserless-oauth-authentication-for-twitter/.
I know it is regarding Twitter, but it uses the same method, so I reckon it just needs a little tweak in the names. In short: if the script is run only by server, install Jython + HTMLUnit, simulate user going to the generated authorization link and clicking 'allow access' button and get token.