- Setup required - Users need to create their own Google/Dropbox OAuth apps
- Personal use focus - It’s designed for individual use, not multi-tenant production
- Prerequisites - Technical comfort with OAuth setup
pip install jyphoto_transferBefore using, you need to set up credentials for both Google and Dropbox.
- Go to Google Cloud Console
- Create a new project (or select existing)
- Go to APIs & Services → Library
- Search for “Photos Library API” and click Enable
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- If prompted, configure the OAuth consent screen (choose External, fill in app name)
- For application type, choose Web Application and enter your Redirect URL (Should be BASE_URL/callback)
- Click Create, then download the JSON file
- Save it somewhere safe (e.g.,
~/.config/jyphoto_transfer/google_photos_creds.json) - If keeping project in Testing mode, add your test users in Audience.
Add these scopes in the Data Access tab * https://www.googleapis.com/auth/photospicker.mediaitems.readonly * openid * https://www.googleapis.com/auth/userinfo.email
- Go to Dropbox App Console
- Click Create app
- Choose Scoped access and Full Dropbox
- Give it a name and click Create app
- On the app settings page, note your App key and App secret
- Make to give the following permissions
- files.content.write - to upload files
- files.metadata.read - to check if files exist (for your get_unique_filename function)
- enter your callback URI
Create a file called ~/.config/jyphoto_transfer/.env with these
values:
BASE_URL=http://localhost:8000/
GOOGLE_CREDS_FILE=google_photos_creds.json
DROPBOX_APP_KEY=your_dropbox_app_key
DROPBOX_APP_SECRET=your_dropbox_app_secret
GOOGLE_TOKEN_FILE=google_token.json
DROPBOX_TOKEN_FILE=dropbox_token.json
DROPBOX_FOLDER=/CopiedPhotosLocation
| Variable | Description |
|---|---|
BASE_URL |
Where the app runs (include trailing slash) |
GOOGLE_CREDS_FILE |
Path to your downloaded Google OAuth JSON |
DROPBOX_APP_KEY |
From Dropbox app settings |
DROPBOX_APP_SECRET |
From Dropbox app settings |
GOOGLE_TOKEN_FILE |
Location of google_token.json |
DROPBOX_TOKEN_FILE |
Location of dropbox_token.json |
DROPBOX_FOLDER |
Dropbox folder to copy photos into |
Add these to your .gitignore:
*.env
*_creds.json
google_token.json
dropbox_token.json
Never commit credentials to git!
from jyphoto_transfer.core import app, serve
serve()Open your browser to http://localhost:8000, log in with Google,
connect Dropbox, select photos, and sync!