Title: Error : Authorization header malformed
Last modified: September 1, 2016

---

# Error : Authorization header malformed

 *  [Djib's](https://wordpress.org/support/users/djibs13/)
 * (@djibs13)
 * [10 years ago](https://wordpress.org/support/topic/error-authorization-header-malformed/)
 * Hello,
 * I have this message when I try to get the token
 * `{"code":"jwt_auth_bad_auth_header","message":"Authorization header malformed.","
   data":{"status":403}}`
 * To obtain this result that I type this command :
 *     ```
       curl -u Name:Password http://Website.com/wp-json/jwt-auth/v1/token
       ```
   
 * or
 *     ```
       curl -u Name http://Website.com/wp-json/jwt-auth/v1/token
       ```
   
 * The .htaccess and wp-config.php file are modified :
 *     ```
       RewriteEngine on
       RewriteCond %{HTTP:Authorization} ^(.*)
       RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
       ```
   
 * and
 *     ```
       define('JWT_AUTH_SECRET_KEY', 'xxxxxx');
       define('JWT_AUTH_CORS_ENABLE', true);
       ```
   
 * May be my command line is false?
 * Thank you
 * [https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)

The topic ‘Error : Authorization header malformed’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [Djib's](https://wordpress.org/support/users/djibs13/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/error-authorization-header-malformed/)
 * Status: not resolved