strapi-plugin-navigation icon indicating copy to clipboard operation
strapi-plugin-navigation copied to clipboard

Rest api

Open danielegustoids opened this issue 2 years ago • 2 comments

Hello! it seems that a token with "read-only" permissions is not enough to consume the rest /api/navigation/render/2?type=tree it is needed a full access token, using it via GET my expectation would be to use a read-only token.

danielegustoids avatar Aug 31 '22 12:08 danielegustoids

I'm getting this issue as well. Works if i directly go in the browser, but calling the API from front-end causes an internal server error. Added the public permissions, but nada

jimjamdev avatar Sep 01 '22 18:09 jimjamdev

We will verify that why default Strapi auth model doesn't allow to access plugin endpoints.

cyp3rius avatar Sep 07 '22 11:09 cyp3rius

So, based on Strapi documentation the "Read-Only" token is dedicated ONLY for Content Manager APIs find and findAll. There are two more token types like "Full Access" and "Custom". First one is going to work as name describes but it's not what you expect. By using second one and selecting the plugin endpoints it works as well and you can make it as Read-Only + Navigation.

There is no possibility to enable Read-Only for the custom plugins.

See reference: https://docs.strapi.io/dev-docs/configurations/api-tokens#usage

cyp3rius avatar Apr 06 '23 07:04 cyp3rius