To create an API token, you must first proceed to the API token menu. To do that, click on Team logo > Personal profile > API tokens.
From there you can see all created tokens, and as well make a new one. To create a new API token, click on Generate new token > Select token type > click Ok
After doing so, the user will see a newly added token in their list: