To create a new API token, first open Main Menu and click API Tokens. Make sure that you have set up 2-factor authentication (2FA) prior to this step. See how to set up 2FA here: How to set up 2-factor authentication (2FA)
Click Create A New Token.
Select permissions for your new API token and use your 2FA device to get a 2FA code, then click Create An API Token.
The next screen will provide you a Token ID and its Token Secret. The latter is displayed once only and will disappear when you navigate away from the page, so make sure you have it saved for future usage.