Announcement

Collapse
No announcement yet.

error 405 Method Not Allowed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • error 405 Method Not Allowed


    When I try to send a GET request, I get a 401 error. When I try to send a POST request, I get a 405 error. Maybe I'm doing something wrong? What could be wrong?​

    log:
    [2023-12-24 19:34:41] ERROR: 405 Method Not Allowed Type: Slim\Exception\HttpMethodNotAllowedException Code: 405 Message: Method not allowed. Must be one of: GET File: /var/www/espocrm/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 94 Trace: #0 /var/www/espocrm/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(58): Slim\Middleware\RoutingMiddleware->performRouting() #1 /var/www/espocrm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process() #2 /var/www/espocrm/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #3 /var/www/espocrm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process() #4 /var/www/espocrm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #5 /var/www/espocrm/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle() #6 /var/www/espocrm/vendor/slim/slim/Slim/App.php(199): Slim\App->handle() #7 /var/www/espocrm/application/Espo/Core/Api/Starter.php(79): Slim\App->run() #8 /var/www/espocrm/application/Espo/Core/ApplicationRunners/Api.php(49): Espo\Core\Api\Starter->start() #9 /var/www/espocrm/application/Espo/Core/Application/RunnerRunner.php(85): Espo\Core\ApplicationRunners\Api->run() #10 /var/www/espocrm/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run() #11 /var/www/espocrm/public/api/v1/index.php(37): Espo\Core\Application->run() #12 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.​

  • #2
    What exactly do you need to retrieve?

    Comment


    • #3

      I want to upload the lead via Postman. But I'm encountering this error. If you upload directly, everything works. But according to the API, no.
      Click image for larger version

Name:	dataurl850204.png
Views:	210
Size:	416 Bytes
ID:	101020

      Comment


      • #4
        When you are using the UI, the same API is used. You can see what is sent in the browser: F12 > Network. Likely you are sending a wrong request.

        Comment


        • #5

          How to do it. I haven't used the API before and this is my first experience. I did everything according to the documentation. I created an API user via the admin panel, copied the API token, and gave this user permission to import and add leads. I copied the API and I can’t connect using this API.​
          Attached Files

          Comment


          • #6
            Maybe provide a screenshot of your request in the Postman. It's hard to say for now.

            Comment


            • #7

              Comment

              Working...
              X