I am working with strapi and i am getting an error 403 Forbidden on calling an api e.g http://localhost:1337/data
I've called all the APIs and the result is same 403 error I've tried it with postman also.
In the api route.js file i have this:
{ "method": "GET", "path": "/data", "handler": "data.find", "config": { "policies": [] }
Strapi server is localhost port:1337
A GET call from browser http://localhost:1337/data
I have a collection of data in mongodb it should give the json document but it is giving this Error:{"statusCode":403,"error":"Forbidden","message":"Forbidden"}
Go to http://localhost:1337/admin/settings/users-permissions/roles then to Public
role and in the Application
permission section check findone
and find
, it will cover needs of an API for frontend app.
Remember to not select more than you need, it will become publicly available for everyone, it may be like chmod 777
, but worse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With