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


#1

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.


ERROR: Login request is missing required email
#2

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.


#3

@jeffreystables Thanks! Just what I needed.