Mega.nz error when check connection: Bad Username/-26/ResourceNotExists

Mega.nz

--auth-password (Password)
Supplies the password used to connect to the server.
The password used to connect to the server. This may also be supplied as the environment variable AUTH_PASSWORD.
--auth-username (String)
Supplies the username used to connect to the server.
The username used to connect to the server. This may also be supplied as the environment variable AUTH_USERNAME.

I don’t have or know Mega, but it looks like it uses username and password (not OAUTH), but maybe those are the same as what you would get by supplying the Username and Password fields in the GUI. You could test, for example using the GUI Commandline option for your job to see if your Target URL contains those.

There has been some question for OneDrive about whether authentication information should be attached onto the URL or supplied separately or both, and how they interact. Possibly Mega can have similar issues.

Setting up OneDrive (personal)

As for the 2FA question, Duplicati is subject to what the library can do, and I see you’ve already asked them. but the answer sounded to me like it’s not there yet. I doubt they can answer the question about Duplicati… MegaApiClient’s documentation, and maybe you can spot another interpretation for those settings. I did not.

Failed to connect: API response: -26 #119 was a good idea. These are the folks who know Mega usage well.