Client_id and client_secret keys aren't created for google drive when configuring rclone in a script

What is the problem you are having with rclone?

TLDR: rclone isn't creating the proper client_id and client_secret entries for google drive when i'm trying to configure rclone in a script in a non interactable way

so,
i’m trying to configure rclone manually in a script using:

rclone config create drive-main drive\
 --drive-client-id CLIENT_ID\
 --drive-client-secret CLIENT_SECRET

this works, however after a few minutes i can't use the google drive anymore and it says:

couldn't fetch token: unauthorized_client: if you're using your own client id/secret, make sure they're properly set up following the docs 

for testing purposes, i configured another remote, but this time i configured it through the interactable cli.

this is the config:

[drive-main-script]
type = drive
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2026-01-27T07:02:10.335016769+06:00","expires_in":3599}
team_drive =

[drive-main-interacted]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2026-01-27T07:03:49.053764482+06:00","expires_in":3599}
team_drive =

the drive-main-interacted was created with the help of the interactable rclone cli, and it had a valid client_id and client_secret

however the drive-main-script was created by the command mentioned before, it doesn't have an entry for a client_id and a client_secret

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

rclone v1.72.1
- os/version: arch (64 bit)
- os/kernel: 6.18.6-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.5 X:nodwarf5
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using?

google drive

is this an issue on my side, or should i open a bug in the github?

As usual, please read the docs carefully.

--drive-client-id or --drive-client-secret are not valid ways to specify config parameters.

ah i just realized that, this was actually a user issue on my end sorry

for future users, the command should be

rclone config create REMOTE_NAME drive\
 client_id CLIENT_ID\
 client_secret CLIENT_SECRET\
 scope DRIVE_SCOPE

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