# Passwordless API calling from Application

**URL:** <https://community.auth0.com/t/passwordless-api-calling-from-application/45289>\
**Category:** Get Help\
**Tags:** api, passwordless, auth0\
**Created:** [June 25, 2020, 3:01pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289 "2020-06-25T15:01:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![orangeuser442](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/orangeuser442/32/22090_2.png) [@orangeuser442](https://community.auth0.com/u/orangeuser442)\
**Post date:** [June 25, 2020, 3:01pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289/1 "2020-06-25T15:01:54Z")

</div>

Hi  
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](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](mailto:ABC@ABC.COM) , client\_id = “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*”, connection =“email”,send = “link”, client\_secret = “CLIENTSECRET” });  
IRestResponse response = client.Execute(request);

Can someone help me on this?

Thanks

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 26, 2020, 4:57pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289/3 "2020-06-26T16:57:22Z")

</div>

Hi @orangeuser442,

Can you try `Content-Type: application/json`?

---

<div class="post-metadata">

**Author:** ![orangeuser442](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/orangeuser442/32/22090_2.png) [@orangeuser442](https://community.auth0.com/u/orangeuser442)\
**Post date:** [June 29, 2020, 2:08pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289/4 "2020-06-29T14:08:52Z")

</div>

Hi,  
thanks it worked .

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 29, 2020, 5:44pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289/5 "2020-06-29T17:44:01Z")

</div>

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

Dan

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 14, 2020, 5:44pm UTC](https://community.auth0.com/t/passwordless-api-calling-from-application/45289/6 "2020-07-14T17:44:03Z")

</div>

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