Get user token (by email and password) from the API

my use case: I develop an E2E test for our application
In the beginning of the test I create a user in auth0 via the api
(first of all I get the API access token via /oauth/token and than I create a user via a POST request to /api/v2/users )
at the end of the tests I want to send a request to my backend, but for that I need to send an authorization header with a bearer-token

So my question is how can I get this bearer-token via the API (I didn’t found any API that I cant send an email and password and get the token back)

Hi @israelk,

Welcome to the Auth0 Community!

You can get access tokens directly in exchange for username/password with the password grant.

More info on how to do that here: Is there an easy way to get a user access token for testing?

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