Two Factor Auth error using REST API

I would imagine the rest api supports it somehow as this is done in their python tools. And after digging around in their python files I saw they were doing it almost identical to mine. I’m creating a web tool where I need a user to be able to login in order to use it.

The shotgun toolkit has users login via python and do it very similar with the TFA within the tool. Maybe there is a way. Otherwise that would be so sad.