I'm experiencing issues connecting Retool with my application. Despite meeting all the necessary conditions, Retool is unable to send API requests to my app. Here are the details:
Custom Authentication: I have implemented custom authentication in Retool, using my app’s login API with the correct credentials. I verified the API works correctly using Postman.
CORS: Our backend is configured to allow calls from any server, so a CORS issue should not be the cause.
Simple API Requests: I also tested our metrics API, which doesn’t require any authentication. It’s a straightforward GET request that returns some data. Despite this simplicity, I'm encountering the same issue.
Here are all the images of the procedure i followed:
I have used a custom auth here which uses login api of my app and returns a token. But while authenticating my resource i can not see any logs of any api reaching my backend servers.
As you can see here the Test auth workflow fails itself.
Api -> https://app-dev.leadzen.ai/api/auth/jwt/login
body -> form data with fields username and password.
but it returns status code 400
I have tested the same api on postman too with same body inputs which returns a token.
Thanks! I'd change the variable to only {{http2.body.access_token}}
It doesn't look like the bearer token is being used in the request, which may explain the 400 error. Can you try adding the token to the request headers? That is where you can put Bearer USER_TOKEN
Very strange. Have you checked all of the headers on the postman request? It looks like there are 11. We may need to specify a content type or accept header.
We can try to compare the exact postman request with the Retool request. On the Retool side, you can expand the error to see the specific request that is sent
I'd also be curious if this api request is working in a Retool query for comparison
I don't think they are the reason for api failing again and again.
And this problem has occurred only a month ago. Before that this same Custom auth workflow was working perfectly.
Thanks, that is helpful. I didn't see any known bugs/regressions that would be related to this, but let me check again with that rough timeline & I'll follow up here