HTTP/1.0 405 Method Not Allowed on auth_requests

Hi,I building a mender client following the API 3.0:
https://docs.mender.io/api/3.0/#device-api-device-authentication

My server is the integration server 3.0:
GitHub - mendersoftware/integration: Mender backend services integration. integration-3.0.0

The first stage is to get the client authenticated, using
https://hosted.mender.io/api/devices/v1/authentication

For that, I created a self signed public/private key pair.

If I perform the API calls using curl on command line, everything works fine. First I get a HTTP error with message “error”:“dev auth: unauthorized”, enable the device on the UI and then I am in.

Now I am trying to implement the same, with the same credentials, but using mbedTLS. On this case, the call returns 405 at HTTP level. I don´t find this option on the API documentation for authentication (I´ve seen it on the other API calls but not this one), so I am kind of lost on what is going on here.

I´ve double checked that the public key and x-men signature is properly hardcoded on the C app.
I paste below the full response.
Thanks for your comments.

HTTP/1.0 405 Method Not Allowed
Content-Length: 30
Content-Type: application/json; charset=utf-8
Date: Thu, 28 Oct 2021 12:46:19 GMT
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: Accept-Encoding
X-Authentication-Version: unknown
X-Men-Requestid: 74ecf9ae-d62b-4793-9c20-57323668f442
X-Xss-Protection: 1; mode=block

{“error”:“Method not allowed”}