Somehow Dropbox on my Mac lost access to my account, so my files aren't syncing anymore. Possibly because I upgraded to a new version of OS X (I'm now on Sierra).
Dropbox is still installed, however. So from the dropbox icon in the top bar I open "Set Up Dropbox", enter email and password, and it sends a verification code to my phone. All is fine so far. But when I enter that varification code into the setup tool, it complains: "Invalid code". It is the exact code Dropbox texted me. I tried this half a dozen times with new codes. It's no typo.
Dropbox just doesn't recognize its own verification code.
What could cause this? And how do I get Dropbox to work again?