Title: Code verification endpoint
Last modified: June 4, 2020

---

# Code verification endpoint

 *  Resolved [novaclever](https://wordpress.org/support/users/novaclever/)
 * (@novaclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/)
 * Hello,
 * It is possible to add a simple “verification code” endpoint (without update the
   password) ?
    I prefer to use the WooCommerce REST API to update the password.
 * Thanks,
    Regards.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12949876)
 * Hello,
 * Thanks very much for getting in contact.
 * OK, sounds like it should be fairly simple to add this.
 * Out of interest, how are you using the WooCommerce API for this? The only way
   I can see to do this is using /wp-json/wc/v3/customers/, but if I’m not mistaken
   you need to be authenticated with WooCommerce REST API App Auth Keys to do this.
 * Last time I was working with this we had to set up a proxy to validate whether
   regular users or guests could take actions with the Woo API to avoid putting 
   the app credentials in the clinet.
 * Cheers!
 *  Thread Starter [novaclever](https://wordpress.org/support/users/novaclever/)
 * (@novaclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12950502)
 * Great, thank you !
    When do you think this feature will be released ?
 * And yes, we made a similar method to prevent guests from taking actions with 
   the Woocommerce API.
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12950505)
 * Am working on a few things today so will do it then if I can, but a couple of
   days max I would expect.
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12950744)
 * There you go, take that for a spine, just uploaded version 0.0.4.
 * You can now send just the email address and code to /wp-json/bdpwr/v1/validate-
   code. It works just like the set new password but without the setting of a new
   password.
 * Plugin page docs updated with that and examples to.
 * Please let me know how it works for you!
 *  Thread Starter [novaclever](https://wordpress.org/support/users/novaclever/)
 * (@novaclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12950900)
 * Thank you for your responsiveness!
 * It looks like the api.route.validate-code.php is missing.
    When I check the api
   folder, there is no api.route.validate-code.php file.
    -  This reply was modified 5 years, 11 months ago by [novaclever](https://wordpress.org/support/users/novaclever/).
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12950985)
 * Ah, odd one, not sure why those changes didn’t get checked in. You should be 
   able to update again to 0.0.5 which will fix that.
 * Cheers,
 *  Thread Starter [novaclever](https://wordpress.org/support/users/novaclever/)
 * (@novaclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12953362)
 * Hello,
 * Yes now it’s working !
 * I don’t know if I should open a new topic, but there is an error with the bdpwr_code_email_text
   filter :
 *     ```
       2020/06/08 09:53:14 [error] 87451#87451: *9276 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /www/my_website/public/wp-includes/class-wp-hook.php on line 289 and exactly 4 expected in /www/my_website/public/wp-content/themes/mytheme-child/functions.php:495
       Stack trace:
       #0 /www/my_website/public/wp-includes/class-wp-hook.php(289): {closure}('\n A password r...')
       #1 /www/my_website/public/wp-includes/plugin.php(206): WP_Hook->apply_filters('\n A password r...', Array)
       #2 /www/my_website/public/wp-content/plugins/bdvs-password-reset/inc/email/functions.php(57): apply_filters('bdpwr_code_emai...', '\n A password r...', 'michael...', '025371', 1591610294)
       #3 /www/my_website/public/wp-content/plugins/bdvs-password-reset/inc/class/class.user.php(53): bdpwr_send_password_reset_code_email('michael...', '025371', 1591610294)
       ```
   
 *  Plugin Author [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12953403)
 * Excellent. And yes please open a new thread, and if you can include your code
   that you’ve written to use this filter when you do that’d be great!
 *  Thread Starter [novaclever](https://wordpress.org/support/users/novaclever/)
 * (@novaclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12953406)
 * Sure 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Code verification endpoint’ is closed to new replies.

 * ![](https://ps.w.org/bdvs-password-reset/assets/icon-128x128.jpg?rev=2301474)
 * [Password Reset with Code for WordPress REST API](https://wordpress.org/plugins/bdvs-password-reset/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bdvs-password-reset/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bdvs-password-reset/)
 * [Active Topics](https://wordpress.org/support/plugin/bdvs-password-reset/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bdvs-password-reset/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bdvs-password-reset/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [novaclever](https://wordpress.org/support/users/novaclever/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/code-verification-endpoint/#post-12953406)
 * Status: resolved