Help with Building an API

Unless I missed it, there’s no Bubble API for displaying a list of States or regions within a country. I specifically need a list of States in the USA, so I built one. And it works, sort of.

The provider gave me an authorization key which is used to GET an authorization token in an API call. I can then use that token to GET the list of states by pasting the token into a header on a separate API call. This all works just fine. Here’s the problem:

The authorization token generated in the first API call expires after a day. So I have to manually update it in the header of the second API call. How can I

  1. Make it so BOTH API calls run concurrently, and
  2. Pass the authorization token from the first API call to the second API call?

Can you share API Doc?
It will be easier to help you. In some case, instead of doing to call, you can use the Bubble Auth part. If not possible, you can manage to use the Token in a Data call that you will use in header of the second API call.

But in some case, you can consider renewing the key every 23h hours later using Scheduled workflow. So it’s all depend on the API you are calling.

I’m a bit of a novice at all of this so I’m not sure what you mean by the “API doc”. But here’s the website where I got the API from:

Using the scheduled workflow sounds like a good idea, but i’m still not sure how I would pass the token from the first API to the second API, in a workflow or not, and I’m not a paid user yet. Can you point me to information regarding the other 2 possible solutions?