What is the problem you are having with rclone?
I am using connection strings to perform remote control commands to Box. If I use access tokens, everything works fine and the requests are authenticating correctly. However, I want to use a config.json file to authenticate to box with JWT. My remote name looks like:
:box,box_config_file=<path_to_config.json>,box_sub_type=enterprise
And then the command:
operations/list
{
fs: ':box,box_config_file=<path_to_config.json>,box_sub_type="enterprise:'
remote: <path>
}
However, I get back the error:
2021/04/06 17:39:42 ERROR : rc: "operations/list": error: error in ListJSON: couldn't list files: Get "https://api.box.com/2.0/folders/0/items?fields=type%2Cid%2Csequence_id%2Cetag%2Csha1%2Cname%2Csize%2Ccreated_at%2Cmodified_at%2Ccontent_created_at%2Ccontent_modified_at%2Citem_status%2Cshared_link&limit=1000&offset=0": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect :box{tocdd}:": oauth2: token expired and refresh token is not set
If I change the path to the config.json file to something different, just to see if there is an issue with the file, I get the same error. I have also tried this connection string:
:box,box_config_file=<path_to_config.json>,box_sub_type=enterprise,client_id=<client_id>,client_secret=<client_secret>
And get the same error. It seems like it's not reading the config file at all, and trying to authenticate with a token instead.
I have used a similar connection string for Google Drive to authenticate with JWT and had no issues, so I think this could be a Box specific problem.
What is your rclone version (output from rclone version
)
1.55
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu
Which cloud storage system are you using? (eg Google Drive)
Box
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
operations/list
{
fs: ':box,box_config_file=<path_to_config.json>,box_sub_type="enterprise:'
remote: <path>
}
A log from the command with the -vv
flag
2021/04/06 17:39:42 ERROR : rc: "operations/list": error: error in ListJSON: couldn't list files: Get "https://api.box.com/2.0/folders/0/items?fields=type%2Cid%2Csequence_id%2Cetag%2Csha1%2Cname%2Csize%2Ccreated_at%2Cmodified_at%2Ccontent_created_at%2Ccontent_modified_at%2Citem_status%2Cshared_link&limit=1000&offset=0": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect :box{tocdd}:": oauth2: token expired and refresh token is not set```