How to get API token without 2FA

You don’t need 2fa to get a token via and oAuth loop.

Do you mean you need 2fa to get a clientID/Secret from the console Twitch Developers ?

There is no way around this requirement for security reasons.

A phone number shouldn’t be require, just a device that can do 2fa without a phone. But it’s been a while since I looked at how Twitch does it, so I don’t know what twitch does or does not support here.

Twitch should provide the QR code/code to copy/paste into a 2fa app. And authy itself provides a desktop/computer app (but iirc that needs a phone to sign up as the phone is the back to 2fa)

Ask the developer of that software to see what the alternatives are.

A quick look suggests that don’t host it for you, just provider the software to download and run yourself, hence the need for your own clientID/secret

It may support using a token generators clientID/token but I don’t know enough about this project or how it works to know for sure.