API incorrectly parsed in Bubble API Connector

I have a database which I try to connect with using the Bubble API Connector plugin. However, it seems that the parameters are incorrectly parsed.

Example:
I want to collect all hotels with country code ESP:
parameter; country[eq]=ESP
This works in postman when using https://database/v1/hotels?country[eq]=ESP
But when I add the parameter country[eq]=ESP in the Bubble API Connector (see screenshot) …


… it gives me the following error message:

Status code 400
{"code":"VALIDATION_ERROR","message":"\"https://database/v1/\" is not allowed","validations":[{"message":"\"https://database/v1/\" is not allowed","code":"OBJECT_UNKNOWN","property":"https://database/v1/"}]}

After some testing, it seems to be that the Bubble API Connector parses the around country[eq] in a complete different way. If I do not parse any parameters, the Bubble API Connector works smoothly.

Does anyone have a solution for this?
If not, is there another way to use API’s in Buble.io ?

Thanks in advance!

Best,
Bram

Instead of passing “country” in the body, you need to pass in the API URL.

1 Like

Thank you @ankur1
It 's working, but it’s somewhat a workaround in my opinion.

Attached you find a screenshot for those who were struggling with the same problem.
In essence you add it to the URL indeed, but you need to fill in ‘[eq]’ as key value for eq (including brackets).

1 Like

@ankur1 I still have a question though, because now I am not able to specify the country code in the app as parameter (because it is in the URL). Meaning, it only works ESP.
If I want to search for CHL for example, how can I specify it as parameter? Parameters can be changed during use of the app, making the API call flexible instead of fixed for ESP.

I tried specifying it as parameter, but somehow it doesn’t allow me to do so. Do you have a solution for this?

Untick ‘Private’ and refresh your editor. You should be able to edit it within the workflow.

1 Like