Title: AI Engine
Last modified: February 23, 2024

---

# AI Engine

 *  Resolved [vbetoglou](https://wordpress.org/support/users/vbetoglou/)
 * (@vbetoglou)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/ai-engine-2/)
 * Hello, this was working fine until I checked it today (been a week since I tried
   to use the site). I am seeing this error message “Sorry, you must be logged in
   to make a request.”
 * I am getting a 401 response to this endpoint: /wp-json/mwai-ui/v1/chats/submit
 * If I log into my site, then it works fine. I don’t remember turning on a feature
   to limit this to logged in users, but this was an idea I had, so now I don’t 
   know if I configured something but didn’t test it thoroughly. Thoughts?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fai-engine-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Val Meow](https://wordpress.org/support/users/valwa/)
 * (@valwa)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/ai-engine-2/#post-17450919)
 * Hey [@vbetoglou](https://wordpress.org/support/users/vbetoglou/) ! 👋
 * When a request is sent to your WordPress REST API AI Engine, retrieve the X-WP-
   Nonce of the request and use the wp_verify_nonce WordPress function to authenticate
   the request. If the response is unauthorized (401), it means that the nonce wasn’t
   valid. This could be due to how you are dealing with cookies/cache. You can try
   disabling other plugins and ensure no processes are running without your knowledge
   that could affect this behavior.
 * However, in your case, this message seems to be coming from somewhere else. Please
   ensure you are not using any filters or third-party security plugins that require
   your users to be logged in to communicate with your WordPress REST API. This 
   might also be a security measure implemented at your hosting service level.
 * Thanks!
 *  Thread Starter [vbetoglou](https://wordpress.org/support/users/vbetoglou/)
 * (@vbetoglou)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/ai-engine-2/#post-17452054)
 * Thanks for the response. I just wanted to share that I disabled the “**Disable
   XML-RPC-API**” plugin and that fixed the issue, incase someone else runs into
   an issue like this in the future.

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

The topic ‘AI Engine’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vbetoglou](https://wordpress.org/support/users/vbetoglou/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/ai-engine-2/#post-17452054)
 * Status: resolved