Unable to get a token for ShareFile

What is the problem you are having with rclone?

Unable to get a token for ShareFile.
Hello everyone. We are working with members who are technically beginners. We apologize in advance for any inconvenience this may cause.
An error occurs while proceeding with the command described below, and the setup is interrupted.

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

rclone v1.68.2

  • os/version: Microsoft Windows 10 Enterprise 22H2 (64 bit)
  • os/kernel: 10.0.19045.5011 (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)

Citrix ShareFile

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

Already have a token - refresh?
 ↓↓
y
 ↓↓
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
 ↓↓
y
2025/01/15 14:30:17 NOTICE: Make sure your Redirect URL is set to "https://oauth.rclone.org/" in your custom config.
2025/01/15 14:30:17 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=Yro1h9RlKSstj8SQbZpFCw
2025/01/15 14:30:17 NOTICE: Log in and authorize rclone for access
2025/01/15 14:30:17 NOTICE: Waiting for code...
 ↓↓
(Browser will automatically launch and display the following error message)
 ↓↓
Error: Unable to validate requested client. 

Of the above four messages from Rclone, the first line of guidance is particularly puzzling. I don't believe the process of setting up the redirect URL was found in the configuration process.
Thinking that the oauth URL might be the area that needs improvement, we tried the following 8 URLs, all of which resulted in an error. After that, I tried without oauth URLs and with no input at all, but even in that case, the error occurred.

https://secure.sharefile.com/oauth/index.aspx?redirect_uri=https://rclone.org
https://secure.sharefile.com/oauth/index.aspx?redirect_uri=https://rclone.org/oauth2/callback
https://secure.sharefile.com/oauth/index.aspx?redirect_uri=http://127.0.0.1:53682
https://secure.sharefile.com/oauth/index.aspx?redirect_uri=http://127.0.0.1:53682/oauth2/callback
https://secure.sharefile.com/oauth/index.aspx?redirect_uri=http://localhost:53682
https://secure.sharefile.com/oauth/index.aspx?redirect_uri=http://localhost:53682/oauth2/callback
https://maedacorp.sharefile.com/oauth2/authorize
https://maedacorp.sharefile.com/oauth2/authorize/index.aspx?redirect_uri=http://localhost:53682

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

[test-sf3]
type = sharefile
client_id = XXX
client_secret = XXX
root_folder_id = XXX
token = XXX
token_url = https://secure.sharefile.com/oauth/token?grant_type=authorization_code

Thank you for your cooperation.

See:

Thank you for the reply.
I will try to enter the URL you answered in the oauth URL.

I have also checked the article you referred us to.
Thank you very much.

(The following is an article quote.)
--citation beginning--
got it to work now but it's not within rClone. I ended up manually creating a script to get new token and update the config file. we used the password grant API which I don't think rClone have a function for this.
--end of quote--

Regarding this content, it seems that you are doing it manually, but can you complete the authentication automatically with just the current version of Rclone?

Maybe? Someone would have to develop it and submit a PR.