Unable to connect to mega.nz - API response: -26

When I try to test connection to mega.nz I get the error: “Failed to connect: API response: -26”
I’ve seen similar issues in the past but multiple years ago. I do have 2FA enabled on my mega account if that matters.
I’m running Duplicati: 2.0.5.1_beta_2020-01-18

Any suggestions would be great.

1 Like

Welcome to the forum @joshuakohut77

Failed to connect: API response: -26 #119 from the mega.nz library developer indicates that’s the reason.

Mega.nz with 2FA not working #3696 is a Duplicati issue noting new library that supports 2FA, but raising questions about how Duplicati would integrate with 2FA. You could try answering. Issue originator did not.

I will try this once I figure out how to upgrade the MegaApiClient that duplicati is using.

I doubt it’s simply a matter of library upgrade. Doesn’t Duplicati need to feed in second factor somehow?

Looking at Duplicati GitHub issue, upgrade might be able to do a different error code, but basically MEGA presumably has some design behind how their 2FA works, and how long (if any time) factor 2 is good for.

As someone who presumably uses MEGA 2FA successfully elsewhere, what can you say about its use?

To detail that question, Duplicati’s library use (which won’t change just by upgrading the library) looks like:

The library has added ability to take a 2FA key via mfakey below, but what does one look like, how long does it last (or does it vary)? Knowing this (I don’t have MEGA) might say if Duplicati has any chance of reasonable operation in a MEGA 2FA environment. How would GUI and CLI interaction with user work?