API Connector Call QueryString option not present

Trying to set up an API call that requires the body parameters to be a query string but the api connector is not showing those as options.

Am I missing something? Previously I always had them by default…not sure why they are not showing up now.

Nevermind…got it figured out…the call type needs to not be a GET and instead a POST for those options to show up.

1 Like

You can add querystrings to the base URL if you really need to do them in a GET. That is all a Querystring is.

> www.something.com/api?code=1234&clientid=sssdddff

Thank you…that will help me with some future calls…I believe having a ‘querystring’ in a GET call is useful if I am going to filter the API data at the time of the GET call, rather than using a parameter.

I think I’ve seen some APIs that documentation states the GET call would need a query string, so will come in handy to have this.

1 Like

My own api requires parameters. I have these in the url. I’ll share how I get them there shortly! it’s my understanding that the parameters of a GET call do become part of the query string

so essentially the query string that bubble calls out to after entering my params looks more like
https://jaredsabaglossary.herokuapp.com/englishs?sort=term&term=operant

^^assuming you are searching the term operant

Yes, you can use in the URL to have variables in the Querystring.

www.something.com/api?code=[code]&clientid=[id]

POST is a bit special, as you can have both Query Strings and Parameters in the body.

(technically you can have a body with a GET too, but Bubble won’t let you for good reason)

Yes. For a GET everything goes in the query part if the URL … ?something&somethingelse etc

For POST you can put things in the HTTP body as well. You can do this in code for a GET if you want…but it isn’t a great idea.

(you can also put arguments into the path of the URL as well so deleting a tweet as the ID in in the path of the POST statuses/destroy/:id )

As to why you don’t do a DELETE on the tweet instead of a POST to something with DESTROY in it … that is whole different kettle of worms :slight_smile:

1 Like

@NigelG @jared.gibb Thanks for the help…wondering if you might be able to provide insight on this.

I am playing around with some API from RapidAPI and I am provided a long list of options

Which of those options should I choose when using the API connector?

HTTP would be my guess.

I would go http or cURL because bubble as a cURL import feature in the api tab.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.