What is the right xml format to change user password

Added over 3 years ago


i would like to use http api to change users' passwords, but it seems I do not use the right xml format to do this.

I send it to the server via http api:

    <x xmlns=\"jabber:x:data\" type='submit\">
      <field type=\"hidden\" var=\"FORM_TYPE\">
      <field var=\"accountjid\">
      <field var=\"password\">

But instead of getting the "completed" response from the server I always get back the "Change User Password Form" (2nd step in the process according to XEP-0133, chapter 4.7).

Could someone to help me figue out what is the right xml format to do the trick?

Replies (2)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

You can send GET request which will return you form that needs to be filled out. As you can see in your example doesn't match required format - it doesn't match one-to-one to the stanza that you send over XMPP connection!

Added by NW NE over 3 years ago

Oh, yes! It's my bad. Everything is fine now. Thank you!