• Resolved Anonymous User 14379775

    (@anonymized-14379775)


    Hi!
    What is the scope of “Disable the use of the JSON REST API on your website to anonymous users”?
    Does it mean that plugins/themes/wpcore can use REST API? Only external requests are restricted?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dave McHale

    (@dmchale)

    If a user is logged into your WordPress installation then REST API endpoints will function as normal… if not, the endpoints will throw an authentication error when accessed.

    If there are specific endpoints or namespaces that you would like to enable for your site visitors – for example, plugins or themes will register a custom namespace for the endpoints they create – you can use the plugin’s Settings screen to whitelist the features you would like to allow anonymous calls to.

    Hope that helps!

    Plugin Contributor Tang Rufus

    (@tangrufus)

    Does it mean that plugins/themes/wpcore can use REST API? Only external requests are restricted?

    One note about internal requests:
    If your plugin/theme using rest_do_request, there is a chance JSON REST API blocks it.

    In this case, your plugin/theme needs to log a user in.
    Maybe wp_set_current_user would helps.

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

The topic ‘Anonymous users vs plugins/themes’ is closed to new replies.