I am developing a MediaWiki Bot that will run as a desktop CLI application. Because it will not be running in a web browser, I will not have a callback URL for the OAuth2 authentication flow.
I believe that OAuth2 can be used when the authorization token needs to be copy/pasted into the desktop application: https://developers.google.com/identity/protocols/oauth2/native-app#ios
Alternatively, a custom URI scheme may be used. However, is this supported by MediaWiki? Or would a Bot password be the way to go?
This is the approach that Huggle takes: https://www.mediawiki.org/wiki/Manual:Huggle/Bot_passwords
Is a Bot password the only option for a CLI application?