OTA to second ssid

Hello,
I am using Arduino IoT cloud with an Arduino Wifi R4 device.
I wonder if I can use OTA if the device is connected to an other SSID.
Tried to ad a second SSID en PASS to the secret tab, but then my device goes offline.
Any suggestions?
Thanks.

Hi @MaxSchaaper. Yes, you can do that. Just make sure to set the SECRET_OPTIONAL_PASS and SECRET_SSID fields of the sketch's "Secret Tab" to the password and SSID of the Wi-Fi access point the board is going to use to connect to the Internet. Alternatively, you can configure the SSID and password by clicking the "Configure" button under the "Network" section on the Thing's "Setup" tab.

You could probably write some custom code that tries an alternative SSID and password if it can't connect to the primary one, but there isn't any support for such a thing in the standard Thing sketch code that is generated by Arduino Cloud.