How properly do i get password reset ticket for each user?

I am facing a problem with requesting this endpoint /api/v2/tickets/password-change .
In documentation is not mentioned that connection_id is required , but i am getting this error when requesting . If i use connection_id for getting the ticket , in that case user_id will be invalid inside a request . So i just wonder , how do i get a ticket for each of user ? Is email enough for identifying ticket ?

So i just wonder , how do i get a ticket for each of user ? Is email enough for identifying ticket ?

Yes, because the email address within a connection is unique.

Thanks for your response . Also a question . There are 2 kind of startegies connection when fetching (auth0, database) . Which one should i use for user password change ? I assume auth0 , but to be sure , need your advice.
Also please update the docs , that connection_id is required field for getting a ticket.

Also please update the docs , that connection_id is required field for getting a ticket.

connection_id is not required if you use the user_id. It’s either/or, see https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change

  • Use only user_id or
  • use connection_id and email.

That’s because when using the user_id alone, which is in a format like this auth0|5d26fd9194be680e0e42b43d for example, it’s clear which connection it refers to (from the first part).

but i am getting this error when requesting

in your first attempt (your initial question), which error message did you get? Did you use user_id as parameter here?

There are 2 kind of strategies connection when fetching (auth0, database)

Yes, it’s auth0.

(Please provide links to any docs you’re referring to, otherwise it’s hard to know which sources you mean. For example, I don’t know where this connection strategy of “database” is coming from, was that mentioned anywhere in some docs or API reference?)

Please see the error message I got when requesting without connection_id

And this is the code for request `

About user_id , be sure it’s valid

Don’t put the email in the data payload.

Now it’s clear. Thanks a lot . Would be great if the doc tells the same .

1 Like

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