Title: Token error
Last modified: August 20, 2016

---

# Token error

 *  Resolved [superkekko](https://wordpress.org/support/users/superkekko/)
 * (@superkekko)
 * [15 years ago](https://wordpress.org/support/topic/token-error/)
 * Hi,
 * I have a problem with the connection between piwik and the plugin. Sometimes 
   the plugin return to me this error:
 * _Please check URL and auth token. You need at least view access to one site._
 * When I refill the Token field the plugin restart to work correctly, but at a 
   next access to wordpress I see the same error.
 * Thanks,
    Francesco

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/token-error/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/token-error/page/2/?output_format=md)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/token-error/#post-2082226)
 * Hi,
 * one user told me his auth token changed suddenly. Are you sure it’s the same 
   token you enter each time?
 *  [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * (@chemicalsailor)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082253)
 * Hey,
 * Got same/similar problem. Got a new install of piwik on a subdomain and set up
   a ‘wp-piwik’ separate user with view access in piwik. Tried putting in the API
   token in widget and keep getting same error as above. The auth token isn’t changing.
   From what I can see the token isn’t getting saved to the database in the options
   array. However it does stay populated in the form when I navigate away and back
   to the page (i.e. the value attribute is set). I don’t understand how this works
   if it’s not set in the database?
 * I’ve tried using different tokens for different users too, none of them work.
 *  [aramsey](https://wordpress.org/support/users/aramsey/)
 * (@aramsey)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082254)
 * I had this same issue. It worked fine on older version of Piwik.
 *  [aramsey](https://wordpress.org/support/users/aramsey/)
 * (@aramsey)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082255)
 * Disregard my issue was resolved with the newest version of piwik by using Ip 
   vs FQDN. Not sure why that worked since they resolve the same, but I’ve got a
   convoluted setup with a reverse proxy.
 *  [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * (@chemicalsailor)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082256)
 * I was mistaken in my first post. I checked the database again and the plugin 
   is saving the API token, but still not connecting to piwik installation.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082257)
 * 1. Check the Piwik URL. Can you access Piwik by copying-&-pasting the URL to 
   your browser?
 * 2. The auth token is not the user’s password. You can get it on Piwik’s API site(“
   full access token”) or on Piwik’s user management site (regarding to the user’s
   settings).
 * 3. Try to open the following URL in your browser combining the data used in 1.([
   YOUR PIWIK URL]) and 2. ([YOUR_AUTH_TOKEN]):
    [http://YOUR_PIWIK_URL/index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess&format=Html&token_auth=YOUR_AUTH_TOKEN](http://YOUR_PIWIK_URL/index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess&format=Html&token_auth=YOUR_AUTH_TOKEN)
 * What’s your result?
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082258)
 * I was able to reproduce this error by installing WP 3.1.1 and updating to 3.1.3.
   It was fixed by updating to Piwik 1.4. Currently I’m not sure how this happens.
 * Please keep sure you are using the latest version of WordPress and Piwik!
 *  [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * (@chemicalsailor)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082259)
 * Hi,
 * Thanks for response.
 * I’m using Piwik 1.4. Brand new installation.
 * Using WP 3.1.3, which has been incrementally updated since 2.8.
 * The settings are correct. I’ve tried prefixing http:// on the url and leaving
   it off.
 * Opening the url in your post gives me a table with value = 1
 * As I mentioned before, Piwik is accessed on a subdomain, and wordpress accessed
   through natural directory structure, i.e.
 * analytics.mydomain.com
    mydomain.com/wordpress
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082260)
 * This is strange and doesn’t look like a WP-Piwik issue. You should get something
   like this: [http://demo.piwik.org/index.php?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=Html&token_auth=anonymous](http://demo.piwik.org/index.php?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=Html&token_auth=anonymous)
 * Did you read this previous threads?
    [http://wordpress.org/support/topic/plugin-wp-piwik-an-error-occured-please-check-url-and-auth-token-1](http://wordpress.org/support/topic/plugin-wp-piwik-an-error-occured-please-check-url-and-auth-token-1)
   [http://wordpress.org/support/topic/plugin-wp-piwik-an-error-occured-please-check-url-and-auth-token?replies=3](http://wordpress.org/support/topic/plugin-wp-piwik-an-error-occured-please-check-url-and-auth-token?replies=3)
 *  [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * (@chemicalsailor)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082261)
 * Hey,
 * Yeah I read those threads before. I’ve already tired deactivating all my plugins
   and it doesn’t make a difference.
 * I’ve double checked that demo url. There is a slight problem with it. If you 
   make the request without the HTML format specified all the values are returned
   as expected, just in an XML format, not a table. On my own installation of Piwik
   the url is case sensitive, it works fine specifying format=html rather than format
   =Html
 * Just updated to wp-piwik 0.8.7
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/token-error/#post-2082288)
 * I still have no idea about this issue – it works fine for me and most other blogs.
   If anyone can give me a hint to reproduce this issue please tell me about this.
 * The ‘check URL and auth token’ error should just appear if ‘SitesManager.getSitesWithAtLeastViewAccess’
   answers with an empty result.
 * WP-Piwik calls this URL:
 * YOUR_URL( + /) + ?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&
   idSite=&period=&date=&format=PHP&filter_limit=&token_auth=YOUR_TOKEN&expanded
   =false
 * Can anyone try this? Thank you very much!
 *  [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * (@chemicalsailor)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/token-error/#post-2082289)
 * Hi,
 * I’ve checked the call_API function in the plugin and cross checked the URL it
   generates. It all works fine for me when I copy it into my browser, I get a serialised
   array returned.
    Did this by emailing the generated url out from the plugin.
 * So call_API is working correctly, and my piwik installation is working correctly
   as it returns the string.
 * I checked get_remote_file function and that is where an empty result is being
   returned causing the error. I’m not sure why this is though. I see that the function
   should always return an array, even if it contains an error message, but it’s
   not returning anything? Both cURL and fopen is enabled on the server.
 * I’ve tested the fopen method on my local machine and the server. It works fine
   on my local machine, but I get nothing returned when testing on the server, so
   my problem is potentially a server issue, but then the plugin tries cURL first.
   I don’t know if the same issue could affect cURL?
 * As I said before, my piwik installation is on a subdomain. I don’t know why this
   should make any difference though if the API is accessed using http
 * The mystery continues…
 *  [TheRingBearer](https://wordpress.org/support/users/theringbearer/)
 * (@theringbearer)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/token-error/#post-2082298)
 * I’ve got the same issue. Might it be related to some RewriteRule used for https
   redirection ?
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/token-error/#post-2082303)
 * I’ve still no idea. Did anyone try to delete all WP-Piwik settings stored in 
   your database und to reinstall the plugin after this?
 * Maybe it’s a problem caused by changes in the settings handling.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/token-error/#post-2082309)
 * Any new results on this? Works still fine here and I still wasn’t able to reproduce
   this issue.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/token-error/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/token-error/page/2/?output_format=md)

The topic ‘Token error’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

 * 20 replies
 * 6 participants
 * Last reply from: [ChemicalSailor](https://wordpress.org/support/users/chemicalsailor/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/token-error/page/2/#post-2082338)
 * Status: resolved