Create a test user and retrieve id token via api?

Hello,

For an automated test, we would like to create a new auth0 user via the api and retrieve an id token for it. We managed to create a user via the management api, but we couldn’t figure out a way to obtain an idtoken for that user. We read through the impersonation api docs but it seems like thats disabled for our account + it seems to get us only a link to impersonate at best, do I understand that right?

So my question is in shot: How can we get an id token for a user in an automated fashon?

Peter

1 Like

If you set a password when you create a user, then you can use the resource owner password grant to retrieve an ID token by specifying openid in the scope parameter.

What are your reasons for wanting an ID token rather than a access token? The latter should be used for authorization.

1 Like