• Resolved vbetoglou

    (@vbetoglou)


    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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @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

    (@vbetoglou)

    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.