Auth0 Home Blog Docs

Create New User & Send email for changing password - HELP with ManagementAPI

I can in c# web application, create auth0 (database) account.

Next step was having auth0 send email for ‘verification’ and password reset.

I was able to post and send email just fine using

var response = await _client.PostAsync(“dbconnections/change_password”, content);

However i was trying for most of the day to do the same via the following managementAPIClient. This was not working. It was my understanding that the following code would do the same as using httpclient and posting. Is this true?

(after executing the following nothing would happen, no emails etc.)

var token = await GenerateManagementApiToken();
var managementApiClient = new ManagementApiClient(token, _auth0Domain);
// Send password change ticket
var req3 = new PasswordChangeTicketRequest()
{
//UserId = userId,
Email = userEmailAddress,
ConnectionId = “con_xxxxx”,
//MarkEmailAsVerified = true,
//IncludeEmailInRedirect = true,
ResultUrl = @“http://localhost:3010/home
};
var changeTicketRequest = await managementApiClient.Tickets.CreatePasswordChangeTicketAsync(req3);