Title: Error status 401 REST-API
Last modified: May 21, 2022

---

# Error status 401 REST-API

 *  Resolved [TungstenE2](https://wordpress.org/support/users/tungstene2/)
 * (@tungstene2)
 * [4 years ago](https://wordpress.org/support/topic/error-status-401-rest-api/)
 * Hi all,
 * WP-Statistics stopped working for me some time ago, but I don’t know why.
 * I see in log several 401 error codes.
 * GET /wp-json/wp-statistics/v2/hit?_=1652xxxxxx&_wpnonce=a9455xxxxc&wp_statistics_hit_rest
   =yes&browser=Googlebot&platform=Unbekannte&version=2.1&referred=https%3A%2F%2Fwww.
   buerfeind.de&ip=66.249.66.23&exclusion_match=yes&exclusion_reason=CrawlerDetect&
   ua=Mozilla%2F5.0+%28Linux%3B+Android+6.0.1%3B+Nexus+5X+Build%2FMMB29P%29+AppleWebKit%
   2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F101.0.4951.64+Mobile+Safari%2F537.36
   +%28compatible%3B+Googlebot%2F2.1%3B+%2Bhttp%3A%2F%2Fwww.google.com%2Fbot.html%
   29&track_all=1&timestamp=1652808394&current_page_type=post&current_page_id=194&
   search_query&page_uri=/2007-6-tage-in-palermo/&user_id=0 HTTP/1.0
 * Also when I try to call the URL directly I get status 401, unauthorized for REST-
   API.
 * {“code”:”rest_cannot_access”,”message”:”DRA: Nur authentifizierte Benutzer k\
   u00f6nnen auf die REST-API zugreifen.”,”data”:{“status”:401}}
 * How to fix this?
 * thx

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

 *  Thread Starter [TungstenE2](https://wordpress.org/support/users/tungstene2/)
 * (@tungstene2)
 * [4 years ago](https://wordpress.org/support/topic/error-status-401-rest-api/#post-15666252)
 * solved
 * I had a plugin installed, to disable REST API for unauthenticated users. Seems
   like an update changed it. Reanabled REST API usage for /wp-statistics/v2/hit
   solved my issue.
 *  [Reza](https://wordpress.org/support/users/reventon94/)
 * (@reventon94)
 * [4 years ago](https://wordpress.org/support/topic/error-status-401-rest-api/#post-15676469)
 * Hi,
 * I hope you’re doing well.
 * I’m glad to hear the issue has been resolved.
 * Sincerely

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

The topic ‘Error status 401 REST-API’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Reza](https://wordpress.org/support/users/reventon94/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/error-status-401-rest-api/#post-15676469)
 * Status: resolved