# "Body is not a valid json" Error in Auth0 Flow

**URL:** <https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170>\
**Category:** Get Help\
**Tags:** other, test\
**Created:** [March 20, 2025, 3:08am UTC](https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170 "2025-03-20T03:08:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbAuth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rbauth0/32/63521_2.png) [@rbAuth0](https://community.auth0.com/u/rbAuth0)\
**Post date:** [March 20, 2025, 3:08am UTC](https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170/1 "2025-03-20T03:08:42Z")

</div>

Trying to make call to API-2 from Auth0 Flow using HTTP Request  
In the body, I need to pass a Boolean value to API-2 which is received from the response of API-1.

{  
“email”: “{{context.user.email}}”,  
“userId”: “{{context.user.user\_id}}”,  
“lastName”: “{{fields.lastName}}”,  
“isReturningMember”: **{{actions.http\_request\_my\_details.body.data.isReturningMember}}**  
}

It gives error for isReturningMember - “Body is not a valid json” because I am not enclosing them in the quote.

If I update it with quotes to “isReturningMember”: **“{{actions.http\_request\_my\_details.body.data.isReturningMember}}”** , the flow works but API-2 fails because it is expecting boolean but string is received in the request body.

How to fix this?

 ![HTTP request json error](https://global.discourse-cdn.com/auth0/original/3X/8/2/82411f339193e106b23a5b2523f3c0bcb96e2045.jpeg)

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [March 20, 2025, 11:53am UTC](https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170/3 "2025-03-20T11:53:09Z")

</div>

Hi @rbAuth0,

Can you tell me what is the value of **{{actions.http\_request\_my\_details.body.data.isReturningMember}}** is?

Have a good one,  
Vlad

---

<div class="post-metadata">

**Author:** ![rbAuth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rbauth0/32/63521_2.png) [@rbAuth0](https://community.auth0.com/u/rbAuth0)\
**Post date:** [March 28, 2025, 12:02am UTC](https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170/4 "2025-03-28T00:02:35Z")

</div>

For others facing similar issue, the solution is  
“isReturningMember”: “{{functions.toBoolean(actions.http\_request\_personal\_details.body.data.isReturningMember)}}”

Use functions.toBoolean and use quotes as well.

---

<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:** [April 11, 2025, 12:03am UTC](https://community.auth0.com/t/body-is-not-a-valid-json-error-in-auth0-flow/184170/5 "2025-04-11T00:03:32Z")

</div>

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