error when check connection: Bad Username/-26/ResourceNotExists

When I use my valid credentials (login without @mail suffix) (also provided using the ‘Advanced Options’ plugins for mega), I keep getting the following error message:

Failed to connect: API response: BadArguments

If I use my email as login I get the following message:

Failed to connect: API response: -26

If I use ‘Edit as text’ from the ‘Advanced options’ and put my password inside the quotes ("[mypassword]") then I get the following response:

Failed to connect: API response: ResourceNotExists

If I do not use quotes and use wrong password I get same message as above (Resource…). Which would mean, the “Failed to connect: API response: -26” should be the most important/meaningful one.

Please see the screenshots for my configuration (I have replace my username with XXX…)

Hello @wheelq and welcome to the forum!

Is this an old account? There are apparently problems new accounts see, but some ideas for workarounds. error when check connection

Your error message looks different though, but possibly some Mega user (I am not one) could help you out.

There have also been a couple of issues filed on the third-party library that Duplicati ships, to access Mega.

ResourceNotExists Error #35

Unicode is not supported #96
however this sounds like it was fixed in library 1.6.3. If you have Duplicati, I think you already have it, however if you’re on the previous beta you don’t. And it might not be this same problem in any case.

Update the MegaApiClient package to improve performance for the Mega backend #3589
which I just discovered, is aimed at performance, but will also bring you library 1.7.1 probably in next canary.


My version of Duplicati -
My account is…3+years old + I have subscribed for 12mo plan with mega.
No, my password doesnt contain unicode characters.

But I do have 2FA enabled…

Maybe you can find someone on a Mega article who would know if that matters? I wonder if it’s anything like:

Setting up OneDrive (personal) where things seemed to hit more bumps (keep reading) after 2FA entered…

ok it worked with 2FA disabled.

What is the auth-password and auth-username in the under ‘Advanced option’ for?

--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.

tried it, gui doenst allow me to test the connection unless ‘original’ fields have been filled in. I guess this is purely for cmd line purposes.