Hi guys. I'm getting a ROUTE_NOT_FOUND
error when performing a PUT request to /api/v1/users/#{user.kinde_id}/password
. This worked locally but not on our staging domain. My local environment is configured in the same way as staging. Other API calls on staging have been working fine. What's going on? What does ROUTE_NOT_FOUND
mean? It's obviously a 404, suggesting the API route does not exist, but why? It works locally, and this is using the same env setup as staging.
Here's an obfuscated example response locally:
We are completely uploaded and fine HTTP/2 200 date: Tue, 26 Nov 2024 12:22:26 GMT content-type: application/json; charset=utf-8 content-length: 72 vary: Accept-Encoding Connection #0 to host <app>-staging.uk.kinde.com left intact ETHON: performed EASY effective_url=https://<app>-staging.uk.kinde.com/api/v1/users/kp_<id>/password response_code=200 return_code=ok total_time=0.072995 HTTP response body ~BEGIN~ {"code": "SET_PASSWORD_SUCCESS", "message": "Password successfully set"} ~END~
KindeApi::ApiError Error message: the server returns an error HTTP status code: 404 Response headers: {"date"=>"Tue, 26 Nov 2024 12:01:56 GMT", "content-type"=>"application/json; charset=utf-8", "content-length"=>"107", "vary"=>"Accept-Encoding"} Response body: { "errors": { "code": "ROUTE_NOT_FOUND", "message": "The requested API route does not exist" } }
Hi Jono,
Do you have a '#' before the user id? This would cause that issue, I would also suggest double checking you're making a PUT request.
A request should look like this:PUT {{business_domain}}/api/v1/users/kp_52d67a6146733831b2984a37ecfec5cb/password
, I've updated the original msg with some more details.
Can I send you a kp_
user ID to check logs on your end?
I don't think it will be user related, that should return the following:
{ "errors": [ { "code": "INVALID_USER_ID", "message": "User not found" } ] }Feel free to send me your custom domain though and I can check the logs
Don't worry, I think it's me being a noob. The Kinde ID is missing on my user in staging—thought I already synced it 🙏