Comments (8)
Hi,
Your code is using the OAtuh 2.0 to get the permissions to use Google Photos API. The gphotos-uploader-cli
does exactly the same, so maybe you can use the client-id
and the client-secret
from above to configure the gphotos-uploader-cli
. This is true if you have created a project were the CLI is able to use the Google Photos API.
My best suggestion is to follow the Getting started documentation.
Let me know if there's a problem when using these credentials.
from gphotos-uploader-cli.
I can use the above code: get_authenticated_service(client_secret_file)
to create the credentials json file from a client secret json file. But how to make gphotos-uploader-cli get the token from that created credentials json file, i.e /content/drive/MyDrive/gphotos-uploader/credentials/1/credentials_for_1.json
, instead of asking the user to go to a local host link which doesn't work on Google Colab.
from gphotos-uploader-cli.
Currently, gphotos-uploader-cli
doesn't offer a way to use external credentials (like the one you're using).
I can't imagine how to re-use the credentials of another program to authenticate gphotos-uploader-cli
.
from gphotos-uploader-cli.
Not of another problem, that function is specifically used to get the token for gphotos-uploader-cli, because I want to try to make it get the token without going to localhost link. Got the credentials, now just need gphotos-uploader-cli to get the token from it.
from gphotos-uploader-cli.
@pacoorozco could you help me with this?, could you please try gphotos-uploader-cli on Google Colab, I'm sure there's a demand to upload medias from Google Drive to Google Photos through Google Colab.
from gphotos-uploader-cli.
Hi @mikebilly
AFAIK Google Colab is a python environment to set up Notebooks and run python scripts. I've never used it, so I don't know how it should work in order to run a go CLI, like gphotos-uploader-cli
.
If you were able to mount the Google Drive to a folder, then you can use gphotos-uploader-cli
to upload the content of the folder.
from gphotos-uploader-cli.
@pacoorozco it's a headless environment, which means doing authentication is very challenging as it can't access localhost. Still looking for a way to make gphotos-uploader-cli
use the pre-created credentials to retrieve the token or find other ways to get the token without needing localhost.
from gphotos-uploader-cli.
I understand the complexity of running this script in a headless environment. In fact, this script was never thought to be run in a headless setup, because the authentication is not easy to be implemented.
In Google Colab they are taking advantage of the fact that their service is in the Google scope 😅
from gphotos-uploader-cli.
Related Issues (20)
- Several SecretBackendTypes not working for MacOS HOT 2
- Unable to run latest version HOT 5
- Add option to specify web port for authentication HOT 1
- Photos "uploaded" but not showing up in google photos HOT 1
- Add a cli switch to specify the name of the album HOT 1
- Uploads are showing date of upload as filename. HOT 5
- allow custom RedirectURLHostname HOT 2
- didn't find all files, please add ability to load file paths from txt. HOT 6
- Show Google Photos API error description to make easier the troubleshooting HOT 9
- Abort upload if v3 directories are found
- 4.2.0 doesn't show version HOT 2
- "option CreateAlbums is invalid, '⏎" on fresh installation HOT 2
- Error message for expired token could be clearer
- Missing steps in OAuth setup / authentication
- Pre resize/encode video to lower resolution and quality before upload HOT 2
- After upgrading from 3.5.2 to 4.5.0 it does not detect already uploaded images HOT 2
- unlimited storage HOT 2
- cannot upload a video that's more than 20gb HOT 1
- Is there any way to divide the job as smaller parts? Because Google api limits 10000 each day HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gphotos-uploader-cli.