Support » Plugin: Tag Groups » Public REST api

  • Resolved grizzzlybear

    (@grizzzlybear)


    Hello!
    Can I get the groups data by some public route? When I trying to fetch it from http://localhost:8080/wp-json/tag-groups/v1/groups/, I’m getting the following error:

    {
        "code": "rest_forbidden",
        "data": {
            "status": 401
        }
    }

    The other routes, like http://localhost:8080/wp-json/wp/v2/posts/ works fine.

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

    (@camthor)

    The route is correct. Maybe it is a bug. I will check if I can find out more.

    I think, it has to do with the permission. There is a new permission callback, which is probably too strict.

    Plugin Author Chris

    (@camthor)

    It will be fixed in the next release.

    If you need a quick fix, you can go to /include/helpers/class.rest_api.php and replace all
    return current_user_can( 'edit_posts' );
    by
    return true;

    That restores the previous behavior that also visitors can access this data. (Since it’s nothing confidential.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.