405 error with Strapi

Hello, I need help. I just started out with the Strapi node and I’m getting a 405 error. I’m utilizing the GetAll request and I don’t know what I’m doing wrong

Hey @hannydevelop!

Thank you for opening the topic. Did you follow all the steps mentioned here: Strapi | Docs

Did you also gave the required permissions from Strapi?

yes, I gave the required permissions and followed the steps. However in URL of your Strapi instance, I put in http://localhost:1337/blogs as this is the URL to my collection type. I also used http://localhost:1337/admin when I got the 405 error. But I still got the error

Did you try with https://localhost:1337? You don’t have to specify the exact endpoint in the credentials.

I think that should be the problem, I now get a different error: 400 - {"statusCode":400,"error":"Bad Request","message":[{"messages":[{"id":"Auth.form.error.invalid","message":"Identifier or password invalid."}]}],"data":[{"messages":[{"id":"Auth.form.error.invalid","message":"Identifier or password invalid."}]}]}:

Hey! My apologies, it should be http://localhost:1337 and not https. This should solve your issue :slight_smile:

I figured, so I now get a different error: 400 - {"statusCode":400,"error":"Bad Request","message":[{"messages":[{"id":"Auth.form.error.invalid","message":"Identifier or password invalid."}]}],"data":[{"messages":[{"id":"Auth.form.error.invalid","message":"Identifier or password invalid."}]}]}:

As the message says, the username or password is not correct. You will have to check them. Also, make sure that this user has the access to the API endpoint.

I’m certain my password is correct and that I followed the instructions carefully so I’ll switch to Ubuntu and hopefully that helps

I just tried this out on Ubuntu and it works fine.