# Help with XML parms on rest/user/session JSON works

**URL:** <https://community.dreamfactory.com/t/help-with-xml-parms-on-rest-user-session-json-works/675>\
**Category:** REST API\
**Created:** [December 18, 2014, 4:35pm UTC](https://community.dreamfactory.com/t/help-with-xml-parms-on-rest-user-session-json-works/675 "2014-12-18T16:35:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommyb](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@tommyb](https://community.dreamfactory.com/u/tommyb)\
**Post date:** [December 18, 2014, 4:35pm UTC](https://community.dreamfactory.com/t/help-with-xml-parms-on-rest-user-session-json-works/675/1 "2014-12-18T16:35:54Z")

</div>

Hi everyone,  
I can login via JSON no problem. Yet when I try using xml the response I get is:

```
<error>
        	<context></context>
            <message>Login request is missing required password.</message>
        	<code>400</code>
 </error>

```

So from the parameters section in Swagger I change the Response & Parameter Content Types run in the body the following:

JSON PASSED

```
 {
      "email": "user@example.com",
      "password": "1234",
      "duration": 2
  }

```

XML FAILED

```
<email>user@example.com</email>
<password>1234</password>
<duration>2</duration>

```

Can some give a hand here and let me know what am I doing wrong with the XML?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [December 18, 2014, 5:08pm UTC](https://community.dreamfactory.com/t/help-with-xml-parms-on-rest-user-session-json-works/675/2 "2014-12-18T17:08:50Z")

</div>

Hi there @tommyb, you will need to wrap your XML in the `<dfapi>` … `</dfapi>` tags.

Notice if you play with the API Docs, these tags always wrap the XML request and response.

---

<div class="post-metadata">

**Author:** ![tommyb](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@tommyb](https://community.dreamfactory.com/u/tommyb)\
**Post date:** [December 18, 2014, 5:19pm UTC](https://community.dreamfactory.com/t/help-with-xml-parms-on-rest-user-session-json-works/675/3 "2014-12-18T17:19:56Z")

</div>

> [@jeffreystables](#):
>
> \<dfapi\> … \</dfapi\>

@jeffreystables Thanks! Just what I needed.
