Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

287
Views
Strapi register method not allowed 405 in v4 seems url is incorrect

quite puzzled with a Strapi question. Working with v4 and hooking up a registration functionality. Invoke code is below. All other things are good i.e. function variables being submitted, etc. But when I call strapi.register I get a 405 All my roles/permissions are good:

// make request to register user with strapi
const response = await strapi.register(username, email, password);

Result: POST http://localhost:1337/auth/local/register 405 (Method Not Allowed)

When I look in the Strapi admin in the User roles and permissions, I see in the box where the register options is that the target url is: /api/auth/local/register !!!

What gives? I read that you may can do something in /config/api.js or similar, or maybe use a proxy in package.json. Can't resolve why this url is different? Is it a bug? How would you make this work. I am specultating that I need to add /api to the request somewhere. But don't know where. Thanks everyone!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You're missing the api/ part. You should change your path for :

  POST  http://localhost:1337/api/auth/local/register
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!