Passwordless API calling from Application

I wrote a sample piece of code that calls ‘/passwordless/start’ API. But I am getting an error like “some body keys are invalid”. The code i tried to trigger API is giving below.

var client = new RestClient(“https://DOMAIN/passwordless/start”);
var request = new RestRequest(Method.POST);
request.AddHeader(“authorization”, “Bearer access_token”);
request.AddHeader(“Content-Type”, “application/x-www-form-urlencoded”);
request.AddJsonBody(new { email = ABC@ABC.COM , client_id = “************************”, connection =“email”,send = “link”, client_secret = “CLIENTSECRET” });
IRestResponse response = client.Execute(request);

Can someone help me on this?


Hi @orangeuser442,

Can you try Content-Type: application/json?

thanks it worked .

1 Like

Glad that solved it. Let us know if you have any other questions.


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