Simple Membership Plugin › Forums › Simple Membership Plugin › Trying to Update Password via swpm_api_action update
Tagged: api, swpm_api_action, update, update account
- This topic has 7 replies, 4 voices, and was last updated 5 years, 7 months ago by
cnr909.
-
AuthorPosts
-
October 6, 2020 at 2:23 am #21083
wmorning
ParticipantI have been trying to update the password of the simple membership user via swpm_api_action update api call.
Everything else seems to update fine except for the password.Is this possible?
What is the correct field, or what do I need to do to update the password?
Any help would be appreciated my code is below here.
$post_arr = array(
‘swpm_api_action’ => ‘update’,
‘key’ => ‘##########’,
‘member_id’ => ‘111’,
‘first_name’ => ‘john’,
‘last_name’ => ‘jackson’,
‘password’ => ‘####’,
’email’ => ‘test@tes.com’,
‘phone’ => ”,
‘address_street’ => ”,
‘address_city’ => ”,
‘address_state’ => ”,
‘address_zipcode’ => ”,
‘country’ => ”,
‘company_name’ => ”
);October 8, 2020 at 2:06 am #21123mbrsolution
ModeratorHi,
Did you enter plain text for the password field as per the following instructions?
https://simple-membership-plugin.com/simple-membership-api-updating-member-account-using-http-post-request/Thank you.
October 8, 2020 at 10:41 am #21125wmorning
ParticipantHi
Thanks for response when you mean plain text as per instructions let say the password is dog12.
Would I put in the password field dog12
If yes then to answer your question I have been putting plain text in the password field.
October 9, 2020 at 9:54 pm #21136mbrsolution
ModeratorThank you for providing more information. I have submitted a message to the developers to investigate further your issue.
Kind regards
October 10, 2020 at 1:05 am #21137admin
KeymasterDo you get an error response?
Try sending both the following fields (with same value):
password
password_reOctober 10, 2020 at 2:21 am #21138wmorning
ParticipantI have tried with both fields having the exact same value it doesn’t return an error but it updates the other fields like zip code etc and the password remain the same. As in the password is not updated.
October 11, 2020 at 1:45 am #21146admin
KeymasterI have updated the API addon to fix a small issue with the password updating code. Please download a new copy and try it (the issue should be solved now):
https://simple-membership-plugin.com/simple-membership-api-updating-member-account-using-http-post-request/December 1, 2020 at 4:51 pm #21635cnr909
ParticipantThere is an issue with the documentation or the code for creating members also. I’m sending a post request with the parameters of email, first_name & last_name, yet the response comes back with a failure message: “Missing one of the mandatory fields: first_name, last_name, email”.
The documentation also says it needs to be a POST request, sending “parameters”. But I take it that means sending a json object with those properties? Because there is also an option to send a get request using url parameters.
I think the documentation could be more explicit. But I’ve tried every combination I could think of and I always get the above error message.
-
AuthorPosts
- You must be logged in to reply to this topic.