How to send a custom user-agent and app URL to a public API?

Hi there,

I searched around but didn’t find any answers to this question in the forums. A public API I am using asks the following of anyone who wishes to leverage it in their app:

provide a custom user-agent with a URL to your application or a page describing it, if used outside client-side javascript

I have set up an API call via the API Connector, no problem. However, I don’t want my app to be blocked once I start leaning more heavily on these API calls.

How does one go about providing a custom user-agent with a call being made via Bubble’s API Connector, with a link to one’s application?

For the time being, I have added a header with Key = “User-Agent” and Value = “String identifying my app”. My API call still succeeds when I reinitialize it, so perhaps this is all that’s required?

Thanks very much for your time in reading this, and any assistance you can offer.

You can just set the correct header for user agent
user-agent and give the value you want (like the name of your app)

1 Like

Hi @Jici ! Yes that is what I ended up doing. Just wasn’t sure that was enough. Thank you! :slight_smile:

You can follow the normal syntax suggested here

1 Like