Title: WP Super Cache REST API
Last modified: March 15, 2023

---

# WP Super Cache REST API

 *  Resolved [atoomic](https://wordpress.org/support/users/atoomic/)
 * (@atoomic)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/wp-super-cache-rest-api/)
 * Hi, I’m trying to use the REST API for the WP Super Cache plugin.
 * After reading the “rest/load.php” which plugs the routes, my understanding is
   that some valid routes are:
   /wp-super-cache/v1/settings/wp-super-cache/v1/plugins
 * But if my domain is mydomain.test after login to mydomain.test/wp-admin as an
   admin user, I cannot get any of the API endpoint work.
 * What am I missing?
 * For example: [https://mydomain.test/wp-json/wp/v2/users](https://mydomain.test/wp-json/wp/v2/users)
   works fine but 
   [https://mydomain.test/wp-json/wp-super-cache/v1/settings](https://mydomain.test/wp-json/wp-super-cache/v1/settings)
   or [https://mydomain.test/wp-json/wp-super-cache/v1/settings](https://mydomain.test/wp-json/wp-super-cache/v1/settings)
 * are returning a 401 error with incorrect permissions
 *     ```wp-block-code
       {"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}
       ```
   
 * I do not see any notions of user for that plugin and was thinking that the admin
   user could call any of these API endpoints.
 * Any idea what I am doing wrong there?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp-super-cache-rest-api%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [atoomic](https://wordpress.org/support/users/atoomic/)
 * (@atoomic)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/wp-super-cache-rest-api/#post-16566637)
 * I was able to solve my issue using Application Password, and then using Basic
   Authentication to submit the request.
 * Looks like the session cookie is not enough on a browser and you probably need
   a `nonce` id also. This is why it was not working from the browser using an authenticated
   user.
 * How To Get An Application Password:
 * > As of 5.6, WordPress has shipped with Application Passwords, which can be generated
   > from an Edit User page (wp-admin -> Users -> Edit User).
 * Alternatively you can use the CLI to generate / refresh the app password
   [https://developer.wordpress.org/cli/commands/user/application-password/](https://developer.wordpress.org/cli/commands/user/application-password/)
   Then you can use it as described here[https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/)
 *     ```wp-block-code
       curl -k --user 'username:YourOneTimePass' https://your-domain.test/wp-json/wp-super-cache/v1/settings
       ```
   
 *  [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * (@gaurav984)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/wp-super-cache-rest-api/#post-16571843)
 * Hi [@atoomic](https://wordpress.org/support/users/atoomic/),
 * Thanks for reaching out and then sharing the solution to the issue also 🙂.
 * Please feel free to contact us if you have any other questions.
 * Best,

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

The topic ‘WP Super Cache REST API’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/wp-super-cache-rest-api/#post-16571843)
 * Status: resolved