Generate an API token for a user internally?

Is the only way to create an API token for a user by making a call to the public API from inside the App with a login so that a token is returned. Seems strange that I have to set up the bubble API as an external API to get the token.

Also is it possible to change the expiry time to more than 365 days?

Yes could you show me how to call that external api. yes i got everything up to that. yes how do i capture the response per user?