How to get token from a nodejs application

hello,
I developed a slack application and it contains some axios requests that require the silent token and some information about the user (like his email). also, it opens the login popup if the user is not authenticated.
all of that seems impossible in an API application with no web interface.
can someone tell me if there is a solution for this ?

Hey there @montassar !

Regarding the API application with no web interface… I assume there is no user involved? If that is the case, I recommend taking a look at the following documentation regarding machine to machine (M2M) applications:

Hope this helps get you headed in the correct direction :smile:

hello @tyf,
I really appreciate your reply. But i still have one more question.
My application has no web interface but it still has to redirect the user to auth0 authentication page and he still needs to pass his email and password in order to login to his account.
in this case, does my application need a M2M application or a regular we application ?

Happy to help!

If there is a user involved then it will need to be a regular web app - Is the goal to receive an access token/id token specific to the user involved?

Let us know!

Further, I definitely recommend checking out our documentation on common architecture scenarios here:

yes, our user needs to login via auth0 before using our application (it has no web interface). the goal is to receive an access/id token and his user information, because some requests to our database require his email or nickname …

How exactly is the user to log in if there is no interface? I guess I am confused by the use case here. Will you already have the user info to log in with? Your estimation may be correct in that there might not be a solution for a use case where there is a user involved, but no way to collect information or interact with them.

hi @tyf ,
well it’s a slack application, slack is a desktop app and we are building a chat bot on it where the user can make requests and receive responses. the only interface the user interacts with, is the slack desktop app interface. but before using it, he has to authenticate via auth0 and we has to take and receive his token in order to authorize his requests

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.