Cloud Sync Task - Google Photos not starting

brahmy

Dabbler
Joined
Mar 24, 2022
Messages
13
Hi folks,
I've gone through the updated steps, but after I use rclone, and then go to Verify the cloud Credentials, I get this error:

couldn't list directory: googleapi: Error 403: Request had insufficient authentication scopes.
Shot in the dark, but is your rclone up-to-date?

Google made a change to what they allowed with OAuth in late 2022, so if you haven't updated rclone since then it may not be able to complete the authentication.
 

bmanwithab

Cadet
Joined
Jan 25, 2023
Messages
1
Hi there,

I was having the same issue. I searched through logs and found nothing. It was just rclone saying "0% done, 0 Bytes/s, ETA: -" which was not very helpful.

Turns out the download wont start when I use the Google authentication provided by TrueNAS aka the button in the Cloud Credentials add dialog that says "Log In To Provider".
I had to create my own Google Photos API Credentials then log in using rclone on my personal computer to get the access token to give TrueNAS.

EDIT: You can find the updated steps in this resource https://www.truenas.com/community/resources/creating-custom-google-photos-api-credentials-for-cloud-sync-task.188/

Steps to do this:

1. Go to https://console.cloud.google.com/apis/dashboard and create a new API project using the drop down in the top left. Make sure your new project is selected.
2. Once in your new project, go to the "Enabled APIs & services" menu on the left.
3. Click "Enable APIs and services" near the top
4. Search for "Photos Library API" and enable it
5. Go back to the API dashboard and click "OAuth consent screen" and then configure
6. It will ask you to configure consent screen. Select "External" then "Create"
7. Fill in the app name, support email and developer contact info then click "Save and Continue"
8. Skip the scopes section
9. Add the Google email address you want to use for Photos on the TrueNAS as a Test User.
10. Go back to the API dashboard and click credentials
11. Click "Create Credentials" and then "OAuth Client ID"
12. Select "Desktop app" as the application type and enter a name.
13. Copy your client ID and Client secret.
14. On your own computer, install rclone and then type "rclone config"
15. Type "n" for new remote and type a name
17. Type "17" for google photos remote type
18. Fill in the client ID and secret from Google API dashboard
19. Type false for readonly
20. Dont edit advanced config
21. Type "y" for auto config and log in to your Google Account in the browser. It will say google hasnt verified the app but hit continue.
22. Tick the box for "See, upload, and organize items in your Google Photos library." and hit continue.
23. Type "y" to whatever rclone says now and it should print out something like:


24. Go to TrueNAS and add a new cloud credential for Google Photos.
25. Copy the client ID, client secret and token from rclone into the dialog. Do not click "Log In To Provider"
(When entering the access token into TrueNAS make sure you enter the whole token, That means include the curly brackets and everything in them)
26. Hit "Verify Credentials" and if that works then save and go set up your cloud sync task with the new credential and it should work.


Sorry there are so many steps. Most of it is pretty self explanatory, just thought I'd go into detail for anyone that has not used the Google API Dashboard before.
Worked perfectly! Thanks a bunch
 

tbarbone

Cadet
Joined
Apr 2, 2023
Messages
1
How do I put the app in production via google? I want to avoid having to constantly do this. Would putting it in production expose any of my google information in anyway?
 

JacobSmelcer

Dabbler
Joined
Aug 25, 2023
Messages
15
Hi there,

I was having the same issue. I searched through logs and found nothing. It was just rclone saying "0% done, 0 Bytes/s, ETA: -" which was not very helpful.

Turns out the download wont start when I use the Google authentication provided by TrueNAS aka the button in the Cloud Credentials add dialog that says "Log In To Provider".
I had to create my own Google Photos API Credentials then log in using rclone on my personal computer to get the access token to give TrueNAS.

EDIT: You can find the updated steps in this resource https://www.truenas.com/community/resources/creating-custom-google-photos-api-credentials-for-cloud-sync-task.188/

Steps to do this:

1. Go to https://console.cloud.google.com/apis/dashboard and create a new API project using the drop down in the top left. Make sure your new project is selected.
2. Once in your new project, go to the "Enabled APIs & services" menu on the left.
3. Click "Enable APIs and services" near the top
4. Search for "Photos Library API" and enable it
5. Go back to the API dashboard and click "OAuth consent screen" and then configure
6. It will ask you to configure consent screen. Select "External" then "Create"
7. Fill in the app name, support email and developer contact info then click "Save and Continue"
8. Skip the scopes section
9. Add the Google email address you want to use for Photos on the TrueNAS as a Test User.
10. Go back to the API dashboard and click credentials
11. Click "Create Credentials" and then "OAuth Client ID"
12. Select "Desktop app" as the application type and enter a name.
13. Copy your client ID and Client secret.
14. On your own computer, install rclone and then type "rclone config"
15. Type "n" for new remote and type a name
17. Type "17" for google photos remote type
18. Fill in the client ID and secret from Google API dashboard
19. Type false for readonly
20. Dont edit advanced config
21. Type "y" for auto config and log in to your Google Account in the browser. It will say google hasnt verified the app but hit continue.
22. Tick the box for "See, upload, and organize items in your Google Photos library." and hit continue.
23. Type "y" to whatever rclone says now and it should print out something like:


24. Go to TrueNAS and add a new cloud credential for Google Photos.
25. Copy the client ID, client secret and token from rclone into the dialog. Do not click "Log In To Provider"
(When entering the access token into TrueNAS make sure you enter the whole token, That means include the curly brackets and everything in them)
26. Hit "Verify Credentials" and if that works then save and go set up your cloud sync task with the new credential and it should work.


Sorry there are so many steps. Most of it is pretty self explanatory, just thought I'd go into detail for anyone that has not used the Google API Dashboard before.
Hello,

I have followed the steps and even got the sync to start. It paused around 35% for an unknown reason, and now I can't get past 0.00%. Do you have any advice?
 
Top