1

Trying to get data from strapi. I read the instructions

Execute a GET request on the restaurant collection type in order to fetch all your restaurants.

**Be sure that you activated the find permission for the restaurant collection type**

import axios from 'axios';

axios.get('http://localhost:1337/api/restaurants').then(response => {
  console.log(response);
});

i create new type "restaurant" in "Content-type builder" and add fields, in "Content manager" created entities of this type. But my answer

{
    "data": null,
    "error": {
        "status": 403,
        "name": "ForbiddenError",
        "message": "Forbidden",
        "details": {}
    }
}

I spent a lot of time searching for an answer, but I never found where to activate the find permission. Where is this option?

Do I need to configure JWT validation for that?

i like Cola
  • 277
  • 6
  • 15

0 Answers0