Issues when adding parameters tu API URL

Hi everyone,

We have a custom API and when calling it and adding parameters to the URL it's failing to retrieve the data.

Here's the example:

Error is : Protocol "http:" not supported. Expected "https:"
Though it doesn't make much sense

If I add the parameters to the connection URL it works.
But I need to change the parameters dynamically

Thanks

2 Likes

Hello @Matias,

Very odd issue, it looks like you set up everything correctly. You might to try clearing the cache for the query. This bug has popped up randomly in the past and some users found that deleting the resource and creating it again has sometimes solved it :sweat_smile:

2 Likes

Thanks @Jack_T

But it didn't work
Not sure what else to do

thanks

1 Like

@Matias Are you self hosting?

This might be an issue with the server connection. If you are self hosted, are you using nginx?

I tried running a request to the URL you have and got a 400 error(guessing my fake auth token :sweat_smile:) but not the http message.


1 Like

@Jack_T thanks

I'm using it from retool's cloud, not self-hosted
And it's still not working

Note that in your example you are passing token and accept as URL parameters and those are headers
Wondering if that could be related

1 Like

@Matias ok good to know, very odd you are getting an error related to network protocols if you are on cloud :thinking:

Good catch :sweat_smile:

Switched those from url params to headers and still have a 400 error.

I was digging through the forums and found that another user was able to fix this issue by changing their auth.

Are you using custom auth? In the resource you might need to set it as BEARER {{token.value}} :crossed_fingers:

If that doesn't work, you might need to come in to office hours and we can try to live troubleshoot/debug.

One last thought, can you screenshot the query metadata from the state tab when you are running the query with the params in the query input field vs when you add the params to the connection UI and run a get from there?

You can find the metadata by clicking the state tab on the left then using the three row symbol below the word 'state' to select the query in question.

1 Like