• Resolved borgchick

    (@borgchick)


    I got the plugin working, and when I am logged into my WP site, everything is working great. Questions are answered, it’s all good.

    However, if I log out of the site, or go to an incognito window, I see a 401 error when I ask a question.

    app.js is posting to /index.php/wp-json/watsonconv/v1/message, and that end point requires authentication, or else it gives back:

    
    {
    "code": "rest_cannot_access",
    "message": "Only authenticated users can access the REST API.",
    "data": {
    "status": 401
    }
    }
    

    I can’t imagine this is the desired behaviour, it would be much more useful if anonymous users can access the bot without having to register first.

    I am running WP 4.9.8. I am running the Watson assistant plugin v0.7.6. Did I do something wrong in my configuration?

    Thanks in advance.

    • This topic was modified 6 years, 5 months ago by borgchick.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor cognitiveclass

    (@cognitiveclass)

    Hi,
    The Watson Assistant plugin doesn’t restrict the chat box to signed-in users; there must be a plugin or some code added to your WordPress site that is causing this.

    Thread Starter borgchick

    (@borgchick)

    Thanks for the tip, I went through my site and disabled all the plugins until Watson worked, and then reenabled the plugins one by one to determine the culprit. And the winner is, the Password Protected plugin (https://github.com/benhuson/password-protected)!

    Duh, kinda obvious when you think about it. I did not have Allow REST API Access enabled. Haha, no wonder the REST API end point required authentication, because I told it to! (and totally forgot)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Watson plugin requires WP login?’ is closed to new replies.