Rclone with Jottacloud and Telia Sky (Norway)

What is the problem you are having with rclone?

I have generated and succesfully connected to jottacloud through Telia Sky Norge, however the tokens only last a day or so as they have an expiry date, I have created a Task in windows to automatically mount the shares on boot + available network and it stops working obviously because the tokjen is invalid.

Run the command 'rclone version' and share the full output of the command.

💀 Phil ⚡ rclone version
rclone v1.68.2
- os/version: Microsoft Windows 11 Pro 24H2 (64 bit)
- os/kernel: 10.0.26100.2605 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.23.3
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Jottacloud with white-label Telia Sky (sky.telia.no)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount Documents:\Documents C:\Users\Phil\Personal\Documents --vfs-cache-mode full

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[Documents]
type = jottacloud
client_id = Workstation
configVersion = 1
client_secret =
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = {"access_token":"xxxx","token_type":"Bearer","refresh_token":"xxxx","expiry":"2024-12-13T11:24:23.2619117+01:00"}
device =
mountpoint =

[Photos]
type = jottacloud
client_id = Workstation
configVersion = 1
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = {"access_token":"xxxx","token_type":"Bearer","refresh_token":"xxxx","expiry":"2024-12-13T11:41:45.6768916+01:00"}

device = Jotta
mountpoint = Photos

A log from the command that you were trying to run with the -vv flag

💀 Phil ⚡ rclone mount Documents:\Documents C:\Users\Phil\Personal\Documents --vfs-cache-mode full -vv
2024/12/13 11:24:30 DEBUG : rclone: Version "v1.68.2" starting with parameters ["C:\\Users\\Phil\\AppData\\Local\\Microsoft\\WinGet\\Links\\rclone.exe" "mount" "Documents:\\Documents" "C:\\Users\\Phil\\Personal\\Documents" "--vfs-cache-mode" "full" "-vv"]
2024/12/13 11:24:30 DEBUG : Creating backend with remote "Documents:\\Documents"
2024/12/13 11:24:30 DEBUG : Using config file from "C:\\Users\\Phil\\AppData\\Roaming\\rclone\\rclone.conf"
2024/12/13 11:24:30 DEBUG : jottacloud root 'Documents': Token expired but no uploads in progress - doing nothing
2024/12/13 11:24:30 DEBUG : Documents: Loaded invalid token from config file - ignoring
2024/12/13 11:24:30 DEBUG : Documents: got fatal oauth error: oauth2: "invalid_client" "Invalid client or Invalid client credentials"
2024/12/13 11:24:30 CRITICAL: Failed to create file system for "Documents:\\Documents": couldn't get customer info: Get "https://api.jottacloud.com/account/v1/customer": couldn't fetch token: invalid_client: if you're using your own client id/secret, make sure they're properly set up following the docs

Hi, welcome to the forum.

If I remember correctly that expiry is for the access token, but it should be able to refresh it using the refresh token even after this. And that expiry is only 1 hour at a time.

I have a Jottacloud account, and I have not experienced what you explain (from what I can remember now at least). I do not have the Telia variant, though.

I'm wondering where did you get this from?

client_id = Workstation

I would have expected it different, according to this:

Did you do anything special when configuring the remote, or did you use the following option and then just defaults:

/ Telia Sky authentication.
| Use this if you are using Telia Sky (Norway).
\ (telia_no)

it should be able to refresh it using the refresh token

I just confirmed this still works in my test setup.

With the following initial state:

token = {"access_token": ... "expiry":"2024-12-13T14:56:26.0566313+01:00"

Running a command against the remote works:

rclone lsd jotta: -vvv
2024/12/13 16:03:35 DEBUG : rclone: Version "v1.69.0-DEV" starting with parameters ["rclone" "lsd" "jotta:" "-vvv"]
2024/12/13 16:03:35 DEBUG : Creating backend with remote "jotta:"
2024/12/13 16:03:36 DEBUG : Using config file from "C:\rclone\data\rclone.conf"
2024/12/13 16:03:36 DEBUG : jotta: Loaded invalid token from config file - ignoring
2024/12/13 16:03:36 DEBUG : Saving config "token" in section "jotta" of the config file
2024/12/13 16:03:36 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2024/12/13 16:03:36 DEBUG : jotta: Saved new token in config file
-1 2000-01-01 01:00:00 -1 A
-1 2000-01-01 01:00:00 -1 B
-1 2000-01-01 01:00:00 -1 C
-1 2000-01-01 01:00:00 -1 D

And it has refreshed the token:

token = {"access_token": ... "expiry":"2024-12-13T17:03:36.5961678+01:00"

Hei and thanks for the reply.

When using only one items on the config (in this case Documents), the token will auto update fine, but if I have both (Documents and Photos) it will not, then it gives me this error:

💀 Phil ⚡ rclone mount Documents:\Documents C:\Users\Phil\Personal\Documents --vfs-cache-mode full -vv
2024/12/16 15:10:51 DEBUG : rclone: Version "v1.68.2" starting with parameters ["C:\\Users\\Phil\\AppData\\Local\\Microsoft\\WinGet\\Links\\rclone.exe" "mount" "Documents:\\Documents" "C:\\Users\\Phil\\Personal\\Documents" "--vfs-cache-mode" "full" "-vv"]
2024/12/16 15:10:51 DEBUG : Creating backend with remote "Documents:\\Documents"
2024/12/16 15:10:51 DEBUG : Using config file from "C:\\Users\\Phil\\AppData\\Roaming\\rclone\\rclone.conf"
2024/12/16 15:10:51 DEBUG : Documents: Loaded invalid token from config file - ignoring
2024/12/16 15:10:51 DEBUG : Documents: got fatal oauth error: oauth2: "invalid_grant" "Session doesn't have required client"
2024/12/16 15:10:51 CRITICAL: Failed to create file system for "Documents:\\Documents": couldn't get customer info: Get "https://api.jottacloud.com/account/v1/customer": couldn't fetch token: invalid_grant: maybe token expired? - try refreshing with "rclone config reconnect Documents:"

This is my config:

[Documents]
type = jottacloud
client_id = desktop
configVersion = 1
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = XXX
device =
mountpoint =

[Photos]
type = jottacloud
client_id = desktop
configVersion = 1
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = XXX
device = Jotta
mountpoint = Photos

With only Documents config:

2024/12/17 16:16:39 DEBUG : Creating backend with remote "Documents:\\Documents"
2024/12/17 16:16:39 DEBUG : Using config file from "C:\\Users\\Phil\\AppData\\Roaming\\rclone\\rclone.conf"
2024/12/17 16:16:39 DEBUG : jottacloud root 'Documents': Token expired but no uploads in progress - doing nothing
2024/12/17 16:16:39 DEBUG : Documents: Loaded invalid token from config file - ignoring
2024/12/17 16:16:39 DEBUG : Saving config "token" in section "Documents" of the config file
2024/12/17 16:16:39 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2024/12/17 16:16:39 DEBUG : Documents: Saved new token in config file

Not sure what the problem is.

Did you create both remotes from scratch, using rclone config, or did you by any chance edit the config file manually and perhaps re-used the same token string? What I'm thinking is, if you somehow have hit a similar issue to what is described for standard authentication - which also refers to error "invalid_grant", although with a different description "Stale token".

Hei,

I created both from scratch, waited to test and mounted Photos: first, it worked, it weas able to generate a new token.

Then I tried with Documents: and I get:

💀 Phil ⚡ rclone mount Documents:\Documents C:\Users\Phil\Personal\Documents --vfs-cache-mode full -vv
2024/12/17 19:21:25 DEBUG : rclone: Version "v1.68.2" starting with parameters ["C:\\Users\\Phil\\AppData\\Local\\Microsoft\\WinGet\\Links\\rclone.exe" "mount" "Documents:\\Documents" "C:\\Users\\Phil\\Personal\\Documents" "--vfs-cache-mode" "full" "-vv"]
2024/12/17 19:21:25 DEBUG : Creating backend with remote "Documents:\\Documents"
2024/12/17 19:21:25 DEBUG : Using config file from "C:\\Users\\Phil\\AppData\\Roaming\\rclone\\rclone.conf"
2024/12/17 19:21:25 DEBUG : jottacloud root 'Documents': Token expired but no uploads in progress - doing nothing
2024/12/17 19:21:25 DEBUG : Documents: Loaded invalid token from config file - ignoring
2024/12/17 19:21:25 DEBUG : Documents: got fatal oauth error: oauth2: "invalid_grant" "Session doesn't have required client"
2024/12/17 19:21:25 CRITICAL: Failed to create file system for "Documents:\\Documents": couldn't get customer info: Get "https://api.jottacloud.com/account/v1/customer": couldn't fetch token: invalid_grant: maybe token expired? - try refreshing with "rclone config reconnect Documents:"
💀 Phil ⚡

My config:

[Documents]
type = jottacloud
client_id = desktop
configVersion = 1
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = {"access_token":"XXXX.xxxx","token_type":"Bearer","refresh_token":"ZZZZ.zzzz","expiry":"2024-12-17T17:16:39.6566036+01:00"}
device = 
mountpoint = 

[Photos]
type = jottacloud
client_id = desktop
configVersion = 1
tokenURL = https://sky-auth.telia.no/auth/realms/get/protocol/openid-connect/token
token = {"access_token":"XXXX.xxxx","token_type":"Bearer","refresh_token":"ZZZZ.zzzz","expiry":"2024-12-17T20:18:05.1510133+01:00"}
device = Jotta
mountpoint = Photos


Not sure if this is at play here but Jottacloud is very weird about its tokens. One token can only be used on one device. If you generate one, then config rclone with it, it should persist through rclone renewing it automatically, however if you make any changes like another device, you will need to get a new token.

When I used Jotta I had it going on my server for months on end so persistence is possible and does work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.