Title: Error: Invalid Token.
Last modified: August 24, 2016

---

# Error: Invalid Token.

 *  Resolved [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/)
 * hello shamim,
    this is a great plugin.
 * i just installed on test website on localhost but im getting the invalid token
   error notification everytime user send/reply message.
    In actual, when i checked
   all the inbox, the message were sent successfully (received/posted) but on the
   sender side keep on displaying error notification. i have no idea of what cause
   the problem.
 * screenshot here: [http://snag.gy/KudfO.jpg](http://snag.gy/KudfO.jpg)
 * thanks
 * [https://wordpress.org/plugins/front-end-pm/](https://wordpress.org/plugins/front-end-pm/)

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

 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140373)
 * is message already sent?
    If yes, your browser is sending the form more than 
   once, only first form will be send and others will show invalid token. It is 
   to prevent multiple form submission.
 *  Thread Starter [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140381)
 * yes, the first message was sent when i clicked the send button but it doesnt 
   shows the “message successfully sent”.
    i think it has something to do with the
   theme compatibility. i’m using betheme 6. how can i force it to use plugin css
   instead of using theme css?
 * when i tested on other site using vantage theme, the message was sent ok but 
   it show warning error line 197 like this.
 * [http://snag.gy/M5Wdb.jpg](http://snag.gy/M5Wdb.jpg)
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140390)
 * This warning will show very first time when you install this plugin in a new 
   website and send message. it will not show any other time.
 *  Thread Starter [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140425)
 * yes you are right. its only shows once.
 * but i still cant fixed the issue with the first site with the token error.
    is
   there any workaround to prevent the plugin from inheriting resource/css from 
   the theme?
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140431)
 * for token error, you can pass success message for token error. So that if token
   error occurred that will show a success message.
 * which css is using from theme? are those define in this plugin? You can add custom
   css in back end settings page of this plugin.
 *  Thread Starter [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140483)
 * hi shamim, what do you mean by…
 * “for token error, you can pass success message for token error. So that if token
   error occurred that will show a success message.”
 * sorry i dont get it..
    do you mean i can bypass the token error? and show the
   success message instead? how? please guide me thanks
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140484)
 * in fep-class.php around line 313 remove
 *     ```
       if (!fep_verify_nonce($message['token'], 'new_message'))
               $errors->add('InvalidToken', __("Invalid Token. Please try again!", 'fep'));
       ```
   
 * and around line 330 find
 *     ```
       if(count($errors->get_error_codes())==0){
       ```
   
 * replace with
 *     ```
       if(count($errors->get_error_codes())==0 && fep_verify_nonce($message['token'], 'new_message')){
       ```
   
 *  Thread Starter [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140488)
 * your solution works flawlessly!!
    tested many times and works like charm. Thank
   you very much!!

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

The topic ‘Error: Invalid Token.’ is closed to new replies.

 * ![](https://ps.w.org/front-end-pm/assets/icon-256x256.gif?rev=2309447)
 * [Front End PM](https://wordpress.org/plugins/front-end-pm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-pm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-pm/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-pm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-pm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-pm/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [eWallz](https://wordpress.org/support/users/archonic08/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/error-invalid-token/#post-6140488)
 * Status: resolved