Can't use /auth/local endpoint to get bearer token (Making Authenticated Requests to a Strapi API)

System Information
  • Strapi Version: 4.0.0
  • Operating System: macOs 12.0.1
  • Database: default
  • Node Version: 14.8.0
  • NPM Version: 6.14.7
  • Yarn Version:

Hi, how are you guys?

I’m a beginner trying to learn this beautiful CMS. I’ve managed to get through quick start guide but I’m stuck at this video: Making Authenticated Requests to a Strapi API - YouTube (Making Authenticated Requests to a Strapi API)

Adding an authenticated user and granting Authenticated role to my API resources works like a charm however I’m unable to get bearer token from /auth/local. It states that post method is not available for this path and it seems that nothing’s really there since GET request results in NotFoundError. What am I missing? I’d be grateful for any tips.

Thanks!

1 Like

Hi,
I’m also new to Strapi I think there were new changes in Strapi v4.
Here is my example in postman, using bearer token.

1.- Create API token
2.- Authorization Bearer Token
3.- Headers: Content-Type: application/json
4.- Example of body

View images of example:

Hope this help you.

Thanks to updated v4 docs I solved my issue: Authenticated request - Strapi Developer Docs