Title: Cannot write authentication token
Last modified: January 17, 2017

---

# Cannot write authentication token

 *  [hirantha](https://wordpress.org/support/users/hirantha/)
 * (@hirantha)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/)
 * Hi,
 * I’m getting following messages on the target server logfile when I hit the “Save
   Changes” button on the Source server site.
 * 2017-01-17 09:51:08#29 – SyncApiModel::render() api=true
    2017-01-17 09:51:08#
   29 – SyncApiModel::get_api_values() request=’1′ 2017-01-17 09:51:08#29 – SyncApiModel::
   get_api_values() request uri=/xxxx/yyyy/?pagename=wpsitesync_api&action=auth 
   2017-01-17 09:51:08#29 – SyncApiModel::get_api_values() keys=array ( ) 2017-01-
   17 09:51:08#29 – SyncApiModel::get_api_values() vals=array ( 0 => ‘1’, ) 2017-
   01-17 09:51:08#29 – SyncApiController::__construct() action=auth source=http://
   10.1.200.191/xxxx/yyyy key=7da52157462ea60d43ad99963df3c3fa 2017-01-17 09:51:
   08#29 – SyncApiController::__construct() – verifying nonce 2017-01-17 09:51:08#
   29 – SyncApiResponse::__toString() returning response data: ‘{“error_code”:27,”
   error_message”:”Cannot write authentication token.”,”session_timeout”:1,”has_errors”:
   1,”success”:0,”data”:{“message”:”Cannot write authentication token.”}}’
 * I looked at the classes/auth.php for related error code ERROR_CANNOT_WRITE_TOKEN
   and it might due to permission that cannot create the token.
 * Need your support to get this running.

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

 *  Plugin Author [ServerPress](https://wordpress.org/support/users/serverpress/)
 * (@serverpress)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/#post-8691373)
 * Hello [@hirantha](https://wordpress.org/support/users/hirantha/),
 * Thank you for contacting us.
 * The “cannot write authentication token” usually happens when/if the database 
   tables are not created correctly.
    Please try deactivating, deleting then reinstalling
   the plugin. If that still doesn’t work, verify that the database credentials 
   have “create table” privileges.
 * Please let us know if this solution works for you.
 *  Thread Starter [hirantha](https://wordpress.org/support/users/hirantha/)
 * (@hirantha)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/#post-8691962)
 * Hi,
 * I have tried – deactivate, delete and reinstalled the plugin with no luck. Before
   that, I checked mysql privileges:
 * MariaDB [wordpress]> show grants for wordpress_user@localhost;
    +———————————————————————————————————————–
   + | Grants for wordpress_user@localhost | +———————————————————————————————————————–
   + | GRANT USAGE ON *.* TO ‘wordpress_user’@’localhost’ IDENTIFIED BY PASSWORD‘*
   0DED16DC899FFC05C098DS930DA28A65D8781BBA’ | | GRANT ALL PRIVILEGES ON `wordpress`.*
   TO ‘wordpress_user’@’localhost’ | +———————————————————————————————————————–+ 
   2 rows in set (0.00 sec)
 * I upgrade the setup to WordPress v4.7.1 and still not working.
 * Please advice.
    -  This reply was modified 9 years, 4 months ago by [hirantha](https://wordpress.org/support/users/hirantha/).
      Reason: typo missing
 *  Thread Starter [hirantha](https://wordpress.org/support/users/hirantha/)
 * (@hirantha)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/#post-8692096)
 * Hi,
 * I think the database table creation is working from the beginning. Here is the
   log file while I activating the plugin.
 * [http://pastebin.com/sSsidUxU](http://pastebin.com/sSsidUxU)
 * And I can see the created tables on the db.
 * [http://pastebin.com/n0ynidNf](http://pastebin.com/n0ynidNf)
 * Hope this is help.
 *  Plugin Author [ServerPress](https://wordpress.org/support/users/serverpress/)
 * (@serverpress)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/#post-8698009)
 * Hello [@hirantha](https://wordpress.org/support/users/hirantha/),
 * We’d like to ask you to send us an email at [support@serverpress.com](https://wordpress.org/support/topic/cannot-write-authentication-token/support@serverpress.com?output_format=md)
   so we can monitor your issue. We will need access to your Target site in order
   to diagnose this further. Please include your WP, FTP and phpMyAdmin access details
   so we can troubleshoot. Thank you.

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

The topic ‘Cannot write authentication token’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpsitesynccontent_ffffff.svg)
 * [WPSiteSync for Content](https://wordpress.org/plugins/wpsitesynccontent/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpsitesynccontent/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpsitesynccontent/)
 * [Active Topics](https://wordpress.org/support/plugin/wpsitesynccontent/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpsitesynccontent/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpsitesynccontent/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ServerPress](https://wordpress.org/support/users/serverpress/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/cannot-write-authentication-token/#post-8698009)
 * Status: not resolved