{"id":24995608,"url":"https://github.com/xob0t/google_photos_mobile_client","last_synced_at":"2025-04-12T04:11:28.935Z","repository":{"id":269639010,"uuid":"908068887","full_name":"xob0t/google_photos_mobile_client","owner":"xob0t","description":"Google Photos client based on reverse engineered mobile API.","archived":false,"fork":false,"pushed_at":"2025-04-06T09:10:56.000Z","size":977,"stargazers_count":63,"open_issues_count":5,"forks_count":10,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-06T10:22:30.011Z","etag":null,"topics":["cli","google-photos","googlepixel","httptoolkit","pyhton","reverse-engineering","unlimited-storage","unofficial","uploader"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xob0t.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T03:29:35.000Z","updated_at":"2025-04-02T12:16:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"64852e93-8a95-4c99-8630-96c080a1e725","html_url":"https://github.com/xob0t/google_photos_mobile_client","commit_stats":null,"previous_names":["xob0t/gphotos-mobile-client","xob0t/google_photos_mobile_client"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xob0t%2Fgoogle_photos_mobile_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xob0t%2Fgoogle_photos_mobile_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xob0t%2Fgoogle_photos_mobile_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xob0t%2Fgoogle_photos_mobile_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xob0t","download_url":"https://codeload.github.com/xob0t/google_photos_mobile_client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514217,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","google-photos","googlepixel","httptoolkit","pyhton","reverse-engineering","unlimited-storage","unofficial","uploader"],"created_at":"2025-02-04T15:39:17.194Z","updated_at":"2025-04-12T04:11:28.920Z","avatar_url":"https://github.com/xob0t.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google_photos_mobile_client\n\nGoogle Photos client based on reverse engineered mobile API.\n\n---\n\n## CLI Demo\n\n![cli demo](media/gpmc-demo.webp)\n\n## Features\n\n- Unlimited uploads in original quality (can be disabled).\n- Use as a CLI tool or Python library.\n- Skips files already present in your account.\n- Upload individual files or entire directories, with optional recursive scanning.\n- Album creation based on directory structure or custom album name.\n- Real-time progress tracking.\n- Configurable threads for faster uploads (default: 1).\n\n## Installation\n\nRun the command:\n\n```bash\npip install https://github.com/xob0t/google_photos_mobile_client/archive/refs/heads/main.zip --force-reinstall\n```\n\n## Example Usage\n\n\u003e [!NOTE]\n\u003e If auth_data is omitted, `GP_AUTH_DATA` env variable will be used\n\n### Python Client\n\n```python\nfrom gpmc import Client\n\npath = \"/path/to/media_file.jpg\" # file or dir path\nauth_data = \"androidId=216e583113f43c75\u0026app=com.google.android.app...\"\n\n\nclient = Client(auth_data=auth_data)\noutput = client.upload(target=path, show_progress=True)\n\nprint(output)\n\n# {\"/absolute/path/to/media_file.jpg\": \"google_photos_media_key\"}\n\n```\n\n### CLI\n\n```bash\ngpmc \"/path/to/media_file.jpg\" --progress --auth-data \"androidId=216e583113f43c75\u0026app=com.google.android.app...\"\n```\n\n```text\nusage: gpmc [-h] [--auth-data AUTH_DATA] [--album ALBUM] [--progress] [--recursive] [--threads THREADS] [--force-upload] [--delete-from-host] [--use-quota] [--saver] [--timeout TIMEOUT] [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--filter FILTER] [--exclude] [--regex] [--ignore-case] [--match-path] path\n\nGoogle Photos mobile client.\n\npositional arguments:\n  path                  Path to the file or directory to upload.\n\noptions:\n  -h, --help            show this help message and exit\n  --auth-data AUTH_DATA\n                        Google auth data for authentication. If not provided, `GP_AUTH_DATA` env variable will be used.\n  --album ALBUM         Add uploaded media to an album with given name. If set to 'AUTO', albums will be created based on the immediate parent directory of each file.\n                        Example for using 'AUTO':\n                        When uploading '/foo':\n                        '/foo/image1.jpg' goes to 'foo'\n                        '/foo/bar/image2.jpg' goes to 'bar'\n                        '/foo/bar/foo/image3.jpg' goes to 'foo' (distinct from the first 'foo' album)\n  --progress            Display upload progress.\n  --recursive           Scan the directory recursively.\n  --threads THREADS     Number of threads to run uploads with. Defaults to 1.\n  --force-upload        Upload files regardless of their presence in Google Photos (determined by hash).\n  --delete-from-host    Delete uploaded files from source path.\n  --use-quota           Uploaded files will count against your Google Photos storage quota.\n  --saver               Upload files in storage saver quality.\n  --timeout TIMEOUT     Requests timeout, seconds. Defaults to 30.\n  --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}\n                        Set the logging level (default: INFO)\n\nFile Filter Options:\n  --filter FILTER       Filter expression.\n  --exclude             Exclude files matching the filter.\n  --regex               Use regex for filtering.\n  --ignore-case         Perform case-insensitive matching.\n  --match-path          Check for matches in the path, not just the filename.\n```\n\n## auth_data? Where Do I Get Mine?\n\nBelow is a step by step instruction on how to accuire your Google account's mobile auth data in a simplest way possible.  \nYou only need to do it once.\n\n1. Get a rooted android device or an emulator. Recommended Android versions 9-13\n2. Connect the device to your PC via ADB.\n3. Install [HTTP Toolkit](https://httptoolkit.com)\n4. In HTTP Toolkit, select Intercept - `Android Device via ADB`. Filter traffic with\n\n    ```text\n    contains(https://www.googleapis.com/auth/photos.native)\n    ```\n\n5. Open Google Photos app and login with your account.\n6. There should be a single request found.  \n   Copy request body as text.  \n   ![http_toolkit_tip](media/image.png)\n7. Now you've got yourself your auth_data! 🎉\n\n## Troubleshooting\n\n- __No Auth Request Intercepted__  \n  1. Log out of your Goolge account.\n  2. Log in again.\n  3. Try `Android App via Frida` interception method in HTTP Toolkit.\n\n- __403 Response Status__  \n  - Try intercepting Google Photos ReVanced. Patch it yourself or use a patched apk [https://github.com/j-hc/revanced-magisk-module/releases](https://github.com/j-hc/revanced-magisk-module/releases)  \n    It uses an alternative to google services, and the format of the auth request is a bit different.\n\n## My Other Google Photos Scripts And Tools\n\n- Web api python client: [https://github.com/xob0t/google_photos_web_client](https://github.com/xob0t/google_photos_web_client)\n- Disguise any file as media for GP to accept and store it: [https://github.com/xob0t/gp-file-hide](https://github.com/xob0t/gp-file-hide)\n- Manage library with bulk operations: [https://github.com/xob0t/Google-Photos-Toolkit](https://github.com/xob0t/Google-Photos-Toolkit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxob0t%2Fgoogle_photos_mobile_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxob0t%2Fgoogle_photos_mobile_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxob0t%2Fgoogle_photos_mobile_client/lists"}