Title: Wp rest api user validate
Last modified: February 14, 2019

---

# Wp rest api user validate

 *  [dileepkumarraja](https://wordpress.org/support/users/dileepkumarraja/)
 * (@dileepkumarraja)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-user-validate/)
 * When i’m using rest api with user validate passing the information username and
   password
 * $user = wp_authenticate($username’,$Password’);
 * if password wrong throwing 500 internal server error instead of need to return
   appropriate message.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-user-validate/#post-11207254)
 * Why are you authenticating users? The API either does not need authentication,
   or that authentication already be done through auth cookie or a specific API 
   Authentication plugin. I’m not saying you are wrong in what you are doing, just
   trying to understand the context.
 * Any related errors in the error log?
 * The code you posted has quotes that do not belong. I’m assuming your actual code
   does not have these.

Viewing 1 replies (of 1 total)

The topic ‘Wp rest api user validate’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-user-validate/#post-11207254)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
