1

I am trying to access wordpress menus using the /wp/v2 api.

The endpoint that I am using is:

My wordpress Staging Site's WP-API Endpoint

The Plugin I am using is:

https://wordpress.org/plugins/wp-api-menus/#description

But on accessing menus I am getting this error message for permission denied:

Error is:

{
"code": "rest_cannot_view",
"message": "Sorry, you cannot view these menus, unless you have access to permission edit them. ",
"data": {
"status": 401
}
}

How can i Set public if it is possible?

1 Answer 1

1

You didn't change your prefix for that plugin's API.

Instead of

/MC-ACF/wp-json/wp/v2/menus

try

/MC-ACF/wp-json/wp-api-menus/v2/menus

That plugin developer states it right on the page you referenced in your question. If you're wondering how I solved this.

I'm not sure what your use case is, but there are newer versions of similar plugins as well. That one works fine, but has not been updated in some time.

1
  • Thanks man. Btw i also found this plugin earlier. But thanks for suggesting.
    – GigaByte
    May 4, 2020 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.