• Resolved superkekko

    (@superkekko)


    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)
  • Plugin Author braekling

    (@braekling)

    Hi,

    one user told me his auth token changed suddenly. Are you sure it’s the same token you enter each time?

    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.

    I had this same issue. It worked fine on older version of Piwik.

    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.

    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

    (@braekling)

    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]):
    https://YOUR_PIWIK_URL/index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess&format=Html&token_auth=YOUR_AUTH_TOKEN

    What’s your result?

    Plugin Author braekling

    (@braekling)

    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!

    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 https:// 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

    (@braekling)

    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

    (@braekling)

    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!

    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…

    I’ve got the same issue. Might it be related to some RewriteRule used for https redirection ?

    Plugin Author braekling

    (@braekling)

    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

    (@braekling)

    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)
  • The topic ‘Token error’ is closed to new replies.