Error tying to create a password change ticket: What should the result url look like?

We need to send a “reset your password” email using our own email provider and our own template. So I need to request from Auth0 a URL that I can send in an email for the user to click. I’m using https://auth0.com/docs/api/management/v2/tickets/post-password-change. When I try, I keep getting this error:

POST https://<my-tenant>.auth0.com/api/v2/tickets/password-change
JSON:

{
  "result_url": "https://my-homepage.com/",
  "user_id": "google-oauth2|13456780",
  "client_id": "<my-client-id>",
  "connection_id": "con_1234567890",
  "email": "email.address@gmail.com",
  "ttl_sec": 0,
  "mark_email_as_verified": true,
  "includeEmailInRedirect": true
}

400 - Payload validation error: ‘Invalid property result_url’

But of course it doesn’t tell me why it’s an invalid result url. I’ve tried trailing slash, no trailing slash, https://, no https://, other dummy URLs, my own client application callback URL–nothing works.

Can someone please explain to me what the result_url is supposed to look like, maybe with an example, or otherwise explain why my sample URL isn’t working?

Additionally, the API documentation doesn’t explain what the response format is. How do I get the URL out of the response?

Thanks.

Hi @tgraboski,

Thanks for your question.

I recommend checking out our Password Change Ticket Error: "Invalid property result_url" knowledge article, which solves this error.

If anything else comes up, please feel free to reach out.

Best,
Rueben

Hi, thanks. That resolves my issue. Some other notes in case someone else stumbles across this:

  • you should skip the user ID and just use the email
  • You can’t use this ticket method for google oauth accounts, which makes sense in retrospect
  • The documentation doesn’t say what the response format is, but it looks like this:
{
    "ticket": "https://domain.com/lo/reset?ticket=zxcvbnljhgfdsawertyuio#"
}
1 Like

Hi @tgraboski,

I’m glad I could resolve your issue, and a big thank you for sharing your notes with the community!

Kind regards,
Rueben

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