# Icloud connect not working: HTTP error 400

**URL:** <https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019>\
**Category:** Suspected Bug\
**Created:** [July 20, 2025, 1:44pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019 "2025-07-20T13:44:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperOok](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@SuperOok](https://forum.rclone.org/u/SuperOok)\
**Post date:** [July 20, 2025, 1:44pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/1 "2025-07-20T13:44:19Z")

</div>

#### What is the problem you are having with rclone?

On Ubuntu 24.04 with official Snap of rclone 1.70.3 the connection to iclouddrive does not work.

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

rclone version  
rclone v1.70.3

- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.14.0-24-generic (x86\_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.24.4
- go/linking: static
- go/tags: snap

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

iCloud Drive

#### The command you were trying to run

```auto
rclone config reconnect icloud: -v
Error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
Usage:
  rclone config reconnect remote: [flags]

Flags:
  -h, --help help for reconnect

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2025/07/20 15:30:25 NOTICE: Fatal error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"

```

#### The rclone config contents with secrets removed.

```auto
[icloud]
type = iclouddrive
apple_id = <myappleid>
password = <mypasswordhash>
description = Linux Ubuntu24.04

```

#### A log from the command with the `-vv` flag

```auto
025/07/20 15:32:08 DEBUG : rclone: Version "v1.70.3" starting with parameters ["/snap/rclone/550/bin/rclone" "config" "reconnect" "icloud:" "--log-file=rclone.log" "-vv"]
2025/07/20 15:32:08 DEBUG : Using config file from "/home/hauke/snap/rclone/550/.config/rclone/rclone.conf"
2025/07/20 15:32:08 DEBUG : icloud: config in: state="", result=""
2025/07/20 15:32:08 DEBUG : icloud: Authenticating as <removed>
2025/07/20 15:32:09 DEBUG : icloud: config out: out=<nil>, err=HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
Error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
Usage:
  rclone config reconnect remote: [flags]

Flags:
  -h, --help help for reconnect

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2025/07/20 15:32:09 NOTICE: Fatal error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [July 20, 2025, 1:53pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/2 "2025-07-20T13:53:43Z")

</div>

welcome to the forum,

> [@SuperOok](#):
>
> official Snap of rclone

the snap version has limitations as compared to the non-snap rclone executable.  
test using the non-snap version.

---

<div class="post-metadata">

**Author:** ![LeoW](https://forum.rclone.org/letter_avatar_proxy/v4/letter/l/edb3f5/32.png) [@LeoW](https://forum.rclone.org/u/LeoW)\
**Post date:** [July 20, 2025, 2:37pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/3 "2025-07-20T14:37:35Z")

</div>

I too have never gotten iCloud to work . I posted here in the Forum a few months ago and there were zero replies. It got moved by somebody into the bug area but then nobody ever did anything with it. Simply closed after a month.

---

<div class="post-metadata">

**Author:** ![rrrocket](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/49beb7/32.png) [@rrrocket](https://forum.rclone.org/u/rrrocket)\
**Post date:** [July 23, 2025, 1:09am UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/4 "2025-07-23T01:09:29Z")

</div>

I am having the same issue on Mac using terminal. I tried to update the token, tried deleting the remote and re-adding the remote (including clearing iCloud info from the config file). I do not even get prompted for 2FA. This is what i get when i try to add an icloud remote on Mac.

`2025/07/22 19:00:25 NOTICE: Fatal error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"`

**rclone version**

```auto

rclone v1.70.3

- os/version: darwin 13.7.6 (64 bit)

- os/kernel: 22.6.0 (x86_64)

- os/type: darwin

- os/arch: amd64

- go/version: go1.24.4

- go/linking: dynamic

- go/tags: cmount

```

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

iCloud Drive

#### The command you were trying to run

```auto
rclone config

n) new remote

61 / iCloud Drive
   \ (iclouddrive)

```

#### The rclone config contents with secrets removed.

Note: this is the entire entry for iCloud, there is no token etc.

```auto
type = iclouddrive
apple_id = xxx
password = xxx

```

#### A log from the command with the `-vv` flag

```auto
2025/07/22 19:14:45 DEBUG : icloud2: config in: state="*all-advanced", result="false"
2025/07/22 19:14:45 DEBUG : icloud2: config out: out=&{State:*postconfig Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/22 19:14:45 DEBUG : icloud2: config in: state="*postconfig", result=""
2025/07/22 19:14:45 DEBUG : icloud2: config in: state="", result=""
2025/07/22 19:14:46 DEBUG : icloud: Authenticating as xxxxxxxx
2025/07/22 19:14:46 DEBUG : icloud2: config out: out=<nil>, err=HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
2025/07/22 19:14:46 DEBUG : icloud2: config out: out=<nil>, err=HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
Error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"
Usage:
  rclone config [flags]
  rclone config [command]

Available commands:
  create Create a new remote with name, type and options.
  delete Delete an existing remote.
  disconnect Disconnects user from remote
  dump Dump the config file as JSON.
  edit Enter an interactive configuration session.
  encryption set, remove and check the encryption for the config file
  file Show path of configuration file in use.
  password Update password in an existing remote.
  paths Show paths used for configuration, cache, temp etc.
  providers List in JSON format all the providers and options.
  reconnect Re-authenticates user with remote.
  redacted Print redacted (decrypted) config file, or the redacted config for a single remote.
  show Print (decrypted) config file, or the config for a single remote.
  touch Ensure configuration file exists.
  update Update options in an existing remote.
  userinfo Prints info about logged in user of remote.

Flags:
  -h, --help help for config

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2025/07/22 19:14:46 NOTICE: Fatal error: HTTP error 400 (400 Bad Request) returned body: "{\"success\":false,\"error\":\"Invalid Session Token\"}"

```

---

<div class="post-metadata">

**Author:** ![LeoW](https://forum.rclone.org/letter_avatar_proxy/v4/letter/l/edb3f5/32.png) [@LeoW](https://forum.rclone.org/u/LeoW)\
**Post date:** [July 23, 2025, 4:33am UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/5 "2025-07-23T04:33:29Z")

</div>

I'm getting the same error that you are.  
At least we have that in common.

---

<div class="post-metadata">

**Author:** ![rrrocket](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/49beb7/32.png) [@rrrocket](https://forum.rclone.org/u/rrrocket)\
**Post date:** [July 23, 2025, 2:36pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/6 "2025-07-23T14:36:42Z")

</div>

I tried today with advanced config, maybe there's some helpful information in here.

```auto
2025/07/23 08:17:12 DEBUG : rclone: Version "v1.70.3" starting with parameters ["rclone" "config" "edit" "-vv"]
2025/07/23 08:17:12 DEBUG : Using config file from "~/.config/rclone/rclone.conf"
Current remotes:

Name Type
==== ====
box box
icloud2 iclouddrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> e

Select remote.
Choose a number from below, or type in an existing value.
 1 > box
 2 > icloud2
remote> 2

Editing existing "icloud2" remote with options:
- type: iclouddrive
- apple_id: email@email.com
- password: ***ENCRYPTED***

2025/07/23 08:17:19 DEBUG : icloud2: config in: state="*all", result=""
2025/07/23 08:17:19 DEBUG : icloud2: config out: out=&{State:*all-set,0,false Option:email@email.com OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:19 DEBUG : icloud2: config: reading config parameter "apple_id"
Option apple_id.
Apple ID.
Enter a value of type string. Press Enter for the default (email@email.com).
apple_id> 

2025/07/23 08:17:21 DEBUG : icloud2: config in: state="*all-set,0,false", result="email@email.com"
2025/07/23 08:17:21 DEBUG : icloud2: config out: out=&{State:*all,1,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:21 DEBUG : icloud2: config in: state="*all,1,false", result=""
2025/07/23 08:17:21 DEBUG : icloud2: config out: out=&{State:*all-set,1,false Option:<xxxxapple IDxxx> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:21 DEBUG : icloud2: config: reading config parameter "password"
Option password.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, keep existing (default)
y/g/n> 

2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all-set,1,false", result="<password>"
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,2,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,2,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,3,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,3,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,4,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,4,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,5,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,5,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,6,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,6,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all,7,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config in: state="*all,7,false", result=""
2025/07/23 08:17:22 DEBUG : icloud2: config out: out=&{State:*all-advanced Option:false OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:22 DEBUG : icloud2: config: reading config parameter "config_fs_advanced"
Edit advanced config?
y) Yes
n) No (default)
y/n> y

2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all-advanced", result="true"
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all,0,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all,0,true", result=""
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all,1,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all,1,true", result=""
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all,2,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all,2,true", result=""
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all,3,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all,3,true", result=""
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all,4,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config in: state="*all,4,true", result=""
2025/07/23 08:17:25 DEBUG : icloud2: config out: out=&{State:*all-set,4,true Option: <xxxxxx> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:25 DEBUG : icloud2: config: reading config parameter "client_id"
Option client_id.
Client id
Enter a value of type string. Press Enter for the default (xxxxxxx).
client_id> 

2025/07/23 08:17:40 DEBUG : icloud2: config in: state="*all-set,4,true", result="xxxxxxx"
2025/07/23 08:17:40 DEBUG : icloud2: config out: out=&{State:*all,5,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:40 DEBUG : icloud2: config in: state="*all,5,true", result=""
2025/07/23 08:17:40 DEBUG : icloud2: config out: out=&{State:*all-set,5,true Option:Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:40 DEBUG : icloud2: config: reading config parameter "encoding"
Option encoding.
The encoding for the backend.
See the [encoding section in the overview](/overview/#encoding) for more info.
Enter a value of type Encoding. Press Enter for the default (Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot).
encoding> 

2025/07/23 08:17:52 DEBUG : icloud2: config in: state="*all-set,5,true", result="Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot"
2025/07/23 08:17:52 DEBUG : icloud2: config out: out=&{State:*all,6,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:52 DEBUG : icloud2: config in: state="*all,6,true", result=""
2025/07/23 08:17:52 DEBUG : icloud2: config out: out=&{State:*all-set,6,true Option: OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:52 DEBUG : icloud2: config: reading config parameter "description"
Option description.
Description of the remote.
Enter a value. Press Enter to leave empty.
description> 

2025/07/23 08:17:55 DEBUG : icloud2: config in: state="*all-set,6,true", result=""
2025/07/23 08:17:55 DEBUG : icloud2: config out: out=&{State:*all,7,true Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:55 DEBUG : icloud2: config in: state="*all,7,true", result=""
2025/07/23 08:17:55 DEBUG : icloud2: config out: out=&{State:*all-advanced Option:false OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:55 DEBUG : icloud2: config: reading config parameter "config_fs_advanced"
Edit advanced config?
y) Yes
n) No (default)
y/n> 

2025/07/23 08:17:59 DEBUG : icloud2: config in: state="*all-advanced", result="false"
2025/07/23 08:17:59 DEBUG : icloud2: config out: out=&{State:*postconfig Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2025/07/23 08:17:59 DEBUG : icloud2: config in: state="*postconfig", result=""
2025/07/23 08:17:59 DEBUG : icloud2: config in: state="", result=""
2025/07/23 08:17:59 DEBUG : icloud: Authenticating as email@email.com
2025/07/23 08:17:59 DEBUG : icloud2: config out: out=<nil>, err=Post "https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true": dial tcp: lookup idmsa.apple.com: no such host
2025/07/23 08:17:59 DEBUG : icloud2: config out: out=<nil>, err=Post "https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true": dial tcp: lookup idmsa.apple.com: no such host
Error: Post "https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true": dial tcp: lookup idmsa.apple.com: no such host
Usage:
  rclone config edit [flags]

Flags:
  -h, --help help for edit

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2025/07/23 08:17:59 NOTICE: Fatal error: Post "https://idmsa.apple.com/appleauth/auth/signin?isRememberMeEnabled=true": dial tcp: lookup idmsa.apple.com: no such host 

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [July 23, 2025, 2:43pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/7 "2025-07-23T14:43:02Z")

</div>

> [@rrrocket](#):
>
> `dial tcp: lookup idmsa.apple.com: no such host `

perhaps a dns issue?

* * *

```auto
ping idmsa.apple.com

Pinging idmsa.idms-apple.com.akadns.net [17.179.252.64] with 32 bytes of data:
Reply from 17.179.252.64: bytes=32 time=75ms TTL=45

```

---

<div class="post-metadata">

**Author:** ![rrrocket](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/49beb7/32.png) [@rrrocket](https://forum.rclone.org/u/rrrocket)\
**Post date:** [July 23, 2025, 2:51pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/8 "2025-07-23T14:51:22Z")

</div>

> [@asdffdsa](#):
>
> perhaps a dns issue?

oh interesting thanks —i will try later on my home wifi rather than the enterprise wifi i am on now & mess with DNS settings and report back.

---

<div class="post-metadata">

**Author:** ![jwink3101](https://forum.rclone.org/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jwink3101](https://forum.rclone.org/u/jwink3101)\
**Post date:** [July 23, 2025, 7:07pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/9 "2025-07-23T19:07:28Z")

</div>

For what it's worth, I am getting it too on my mac at work and my Ubuntu VPS. Neither is a great test as the mac is behind a pretty intense corporate firewall and the VPS is not a mac.

---

<div class="post-metadata">

**Author:** ![DavidMasterson](https://forum.rclone.org/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@DavidMasterson](https://forum.rclone.org/u/DavidMasterson)\
**Post date:** [August 4, 2025, 9:22pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/10 "2025-08-04T21:22:49Z")

</div>

For what it's worth, I am getting this error too on my HP Chromebook running Debian bookworm. I have use 'rclone config' to set this up before and it worked, but now, after deleting the drive and readding it, I get the same error as above. Is there possibly a config database that is holding an old credential that needs to be deleted?

---

<div class="post-metadata">

**Author:** ![DavidMasterson](https://forum.rclone.org/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@DavidMasterson](https://forum.rclone.org/u/DavidMasterson)\
**Post date:** [August 4, 2025, 9:33pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/11 "2025-08-04T21:33:30Z")

</div>

Update: hand removed ~/.config/rclone/rclone.conf to see if it would work from scratch. It regenerated the file with a password that, I assume, is a session ID. However, the error says that it is am invalid session ID. Did Apple change the process and, thus, break Rclone?

---

<div class="post-metadata">

**Author:** ![jwink3101](https://forum.rclone.org/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jwink3101](https://forum.rclone.org/u/jwink3101)\
**Post date:** [August 4, 2025, 9:52pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/12 "2025-08-04T21:52:51Z")

</div>

This is a good test. I did the same, but just with defining a new config. I got the same error.

It turns out we are not alone. See [Invalid Session Token while connecting to iCloud · Issue #8587 · rclone/rclone · GitHub](https://github.com/rclone/rclone/issues/8587) which also has a suggested workaround. Sounds like mixed luck on the workaround.

---

<div class="post-metadata">

**Author:** ![mqmoore](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@mqmoore](https://forum.rclone.org/u/mqmoore)\
**Post date:** [August 6, 2025, 4:40pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/13 "2025-08-06T16:40:22Z")

</div>

I'm adding to the thread here mainly to stay up to date. I have the same basic issues and have tried similar fixes: Ubuntu 24.04.3 system; rclone v1.70.3; have been very happily been using iclouddrive for several months prior. I first got the same bad token error, then deleted and re-created the config, and lastly seem to be stuck with the same HTTP 400 errors. Claude says this is most likely an unexpected change on the Apple side which makes sense to me. Hoping it's resolvable.

---

<div class="post-metadata">

**Author:** ![ArturKlauser](https://forum.rclone.org/user_avatar/forum.rclone.org/arturklauser/32/20330_2.png) [@ArturKlauser](https://forum.rclone.org/u/ArturKlauser)\
**Post date:** [August 12, 2025, 6:04pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/14 "2025-08-12T18:04:41Z")

</div>

The latest discovery on [Issue #8587](https://github.com/rclone/rclone/issues/8587#issuecomment-3169264324) was that building rclone 1.71.0-DEV **from source** works, whereas the prebuilt binaries did not. I tried that and it finally fixed the problem for me.

> **Here is a recap of how to do that:**
>
> Build it on a development machine with ‘go’ installed. It doesn’t have to be the same architecture or OS as where you want to run it eventually since it can easily be cross-compiled. E.g., I’ve compiled it on a MacBook Pro, for a Synology NAS (Linux, amd64).
> 
> ```bash
> git clone https://github.com/rclone/rclone.git
> cd rclone
> GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build
> 
> ```
> 
> That will result in a `./rclone` binary that you have to copy onto your target machine. Optionally, you might want to consider running `go clean -modcache` afterwards since the build downloads a lot of dependencies onto your dev machine.

---

<div class="post-metadata">

**Author:** ![dsorge](https://forum.rclone.org/user_avatar/forum.rclone.org/dsorge/32/20396_2.png) [@dsorge](https://forum.rclone.org/u/dsorge)\
**Post date:** [August 30, 2025, 6:13pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/15 "2025-08-30T18:13:28Z")

</div>

Tried this today without success.

I built rclone v1.72.0-DEV from source to run on ubuntu 24.04 (64 bit), and received this error:

``  
`Error: HTTP error 400 (400 Bad Request) returned body: "{"success":false,"error":"Invalid Session Token"}"`  
```

Most annoying!

---

<div class="post-metadata">

**Author:** ![ArturKlauser](https://forum.rclone.org/user_avatar/forum.rclone.org/arturklauser/32/20330_2.png) [@ArturKlauser](https://forum.rclone.org/u/ArturKlauser)\
**Post date:** [August 30, 2025, 7:01pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/16 "2025-08-30T19:01:39Z")

</div>

Yeah, the community reports on that github issue have in the meantime also shown mixed success, i.e., it worked for some people, but not others. There is no clear understanding of the difference between the success and failure cases thought. Some people have started to suspect that Apple’s servers are throttling this.

---

<div class="post-metadata">

**Author:** ![akI-69](https://forum.rclone.org/user_avatar/forum.rclone.org/aki-69/32/20410_2.png) [@akI-69](https://forum.rclone.org/u/akI-69)\
**Post date:** [September 1, 2025, 7:42pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/17 "2025-09-01T19:42:43Z")

</div>

24.04 here –\> self compiling 1.72 dev from source worked for me

---

<div class="post-metadata">

**Author:** ![ArturKlauser](https://forum.rclone.org/user_avatar/forum.rclone.org/arturklauser/32/20330_2.png) [@ArturKlauser](https://forum.rclone.org/u/ArturKlauser)\
**Post date:** [September 2, 2025, 3:28am UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/18 "2025-09-02T03:28:51Z")

</div>

It looks like there is now an explanation of the observed behavior and a workaround on github [Issue #8587](https://github.com/rclone/rclone/issues/8587#issuecomment-3240025307) that works for most (all?) people:

Apple is apparently throttling/denying traffic based on what the request’s `user-agent` string is. When you compile from source, part of the `user-agent` string is different (i.e., the exact version number), which is why that worked for some people. If you explicitly set a random `user-agent` string, it seems that the request always goes through. I.e.,

`rclone --user-agent="your-own-random-string" config reconnect iclouddrive:`

---

<div class="post-metadata">

**Author:** ![Pexilo](https://forum.rclone.org/user_avatar/forum.rclone.org/pexilo/32/20412_2.png) [@Pexilo](https://forum.rclone.org/u/Pexilo)\
**Post date:** [September 2, 2025, 2:36pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/19 "2025-09-02T14:36:48Z")

</div>

Tried this today

I can confirm that it solved the issue for me.

---

<div class="post-metadata">

**Author:** ![mqmoore](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@mqmoore](https://forum.rclone.org/u/mqmoore)\
**Post date:** [September 3, 2025, 4:11pm UTC](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019/20 "2025-09-03T16:11:56Z")

</div>

This is an amazing find. I can also confirm the –user-agent flag works for me. Many thanks!

[Next page](https://forum.rclone.org/t/icloud-connect-not-working-http-error-400/52019.md?page=2)
