Title: How to validate token ?
Last modified: August 30, 2016

---

# How to validate token ?

 *  [reivax35](https://wordpress.org/support/users/reivax35/)
 * (@reivax35)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/how-to-validate-token/)
 * Hi,
    I would like create a webapp with AngularJS.
 * When i try to get the token, it’s work [http://localhost/wp_rest/wp-json/jwt-auth/v1/token](http://localhost/wp_rest/wp-json/jwt-auth/v1/token))
   
   but i can’t doing the requete for post mehod: [http://localhost/wp_rest/wp-json/wp/v2/posts](http://localhost/wp_rest/wp-json/wp/v2/posts)
   I get error 403 :
 *     ```
       {
       "code": "rest_forbidden"
       "message": "You don't have permission to do this."
       "data": {
       "status": 403
       }-
       }
       ```
   
 * In my header i have this :
    `Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
   eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL3dwX3Jlc3QiLCJpYXQiOjE0NTAzNDEwMTgsIm5iZiI6MTQ1MDM0MTAxOCwiZXhwIjoxNDUwOTQ1ODE4LCJkYXRhIjp7InVzZXIiOnsiaWQiOiIxIn19fQ.
   rGNPsU4EocClWLYWaSDs1hDJMODszg-eKfqnKSEsiw0`
 * I’m trying with [http://localhost/wp_rest/wp-json/jwt-auth/v1/token/validate](http://localhost/wp_rest/wp-json/jwt-auth/v1/token/validate)
   but i have this error :
    { “code”: “jwt_auth_no_auth_header”, “message”: “Authorization
   header not found.”, “data”: { “status”: 403 } }
 * What is the problem ?
    Thanks
 * [https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)

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

 *  [ahgood](https://wordpress.org/support/users/ahgood/)
 * (@ahgood)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-validate-token/#post-6860479)
 * Modified .htaccess file as following then it works for me, my WordPress installed
   on on folder /wp1/:
 * RewriteEngine On
    RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) –[
   E=HTTP_AUTHORIZATION:%1] RewriteBase /wp1/ RewriteRule ^index\.php$ – [E=X-HTTP_AUTHORIZATION:%{
   HTTP:Authorization},QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{
   REQUEST_FILENAME} !-d RewriteRule . /wp1/index.php [E=X-HTTP_AUTHORIZATION:%{
   HTTP:Authorization},QSA,L]
 * *Original info come from: [https://github.com/auth0/wp-jwt-auth/issues/1](https://github.com/auth0/wp-jwt-auth/issues/1)
 *  [matikasrf](https://wordpress.org/support/users/matikasrf/)
 * (@matikasrf)
 * [10 years ago](https://wordpress.org/support/topic/how-to-validate-token/#post-6860482)
 * you surely are putting the header as a parameter in your request
 * try putting Authorization in the header , not in the parameters

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

The topic ‘How to validate token ?’ is closed to new replies.

 * ![](https://ps.w.org/jwt-authentication-for-wp-rest-api/assets/icon-256x256.jpg?
   rev=3372068)
 * [JWT Authentication for WP REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/reviews/)

## Tags

 * [auth](https://wordpress.org/support/topic-tag/auth/)
 * [wp rest api](https://wordpress.org/support/topic-tag/wp-rest-api/)

 * 2 replies
 * 3 participants
 * Last reply from: [matikasrf](https://wordpress.org/support/users/matikasrf/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/how-to-validate-token/#post-6860482)
 * Status: not resolved