@ErgiLaze
As @matthew_buckett said, if you have an external application that need to access Canvas as the user, then you should have students log into Canvas and then launch your application with either OAUTH2 or LTI after creating a developer key. That avoids the manual logging in that you want to avoid.
An external application should not be asking people for their Canvas login and password as that is very bad security. A multi-user application that asks people to create a token for them violates the terms of service.
The call to generate an API token as a user is not an API call itself. It is an internal Canvas call, which means that you would have to log into Canvas as the user first and then generate the token. This makes it difficult for them to log into your application first and then you log into Canvas as them to get a token. This could be done with a headless browser if you had the user login and password information. This is not a supported method, though, and is not the way you should do this.
For our institutional applications that need to access Canvas on behalf of other users without user interaction, we created a service account and created an access token for that account. That access token never appears in JavaScript or other content delivered to the user, it is kept completely on a back-end server application. It can be used to take actions on behalf of people (using masquerading if necessary).