I am trying to create API for my wordpress website in order to link the site with the android app I developed. I created a json api for wp_users table in phpmyadmin and it works perfect. But, there is a problem I can't figure out. The password of the users are shown up in hashed form. Here is how my API looks like:
"1": {
"ID": 1,
"user_login": "user1",
"user_pass": "$P$BT6.fyjiaKZVEx/jM8sy5kC4QRkizg.",
"user_nicename": "user1",
"user_email": "user1@gmail.com",
"user_url": "http://localhost/MyWebsite",
"user_registered": "2021-10-27 21:29:02",
"user_activation_key": "",
"user_status": 0,
"display_name": "User1"
},
"2": {
"ID": 2,
"user_login": "user2",
"user_pass": "$P$BArUGOBZAJfD1J3sE8OgRA3Bk1Ynfg/",
"user_nicename": "user2",
"user_email": "user2@gmail.com",
"user_url": "",
"user_registered": "2021-10-31 18:31:32",
"user_activation_key": "",
"user_status": 0,
"display_name": "User2"
},
"3": {
"ID": 3,
"user_login": "user3",
"user_pass": "$P$B8rgiyaWrgWbkbFLMLlp2r7nIwFDwr.",
"user_nicename": "user3",
"user_email": "user3@gmail.com",
"user_url": "",
"user_registered": "2021-10-31 18:31:34",
"user_activation_key": "",
"user_status": 0,
"display_name": "User3"
}
}
I found this on GitHub but in my website I can't search wp-json/user/login or wp-json/user/register. So, is there another way to create API for wordpress or should I add something more in order to synchronize user authentication in both my website and the android app?