You can use this tool to easily create an OAuth2 application on any Mastodon instance. This will return you a client_id and client_secret for you to then use in your application.
This runs completely within your browser and is secure.
If you have feedback or suggestions to improve this tool, please open an issue or file a pull request with your changes.
This tool is licensed under an Apache 2.0 license which you can find within this repository in the LICENSE file.