Hi All,
I’m looking to create an app that creates an analytics dashboard for users’ data when they integrate their data from a handful of 3rd party services. Two APIs I’m looking at use OAuth 2.0 which I am slowly sorting out, and seeing that there are likely limitations in my ability to use a back-end service like Zapier to call the APIs programmatically and on a recurring schedule to retrieve updated records.
I’m not wondering if I EVEN WANT to bringing the data from the 3rd party services into a back-end database like Backendless. Wouldn’t this be redundant? I could imagine that I should just keep the data where it lives (in the 3rd party service it comes from) and just call the API when the user loads the page. I imagine I would use a database just to house manually entered records, but otherwise shouldn’t I just call the API directly in the page/the visuals?
How should I think about architecting this? Is there something I may be missing?
Thank you!
Will
I’m now thinking part of it could be depending on the availability of the 3rd party data. Perhaps I’m concerned that I wouldn’t be able to get records as far back as I’d like someday in the future, or I just want to have a second back-up record for my users?
At that point should I just wire the front-end to a database that is fed user data by calls to the APIs? (I am not convincing myself of the opposite! Help!)
Hi!
You should use Bubble to call to the APIs directly. Then you can:
-
either create data types in Bubble to store that Data and link them appropriately (you’ll need to figure out points in your user experience to keep that information up to date)
-
Set up states to store the fetched data client side. This will always be up to date since it calls the APIs during each page load.
You can use option 1 if you want backend workflows to interact with the APIs.
Hi,
Thanks for your response!
That makes sense. Once the user has authenticated their 3rd party API, would I store their token to use for the next time they log in?
How would I generally manage doing authenticated API calls after the user has logged out then back in for another session?
Thank you!
Yep, you can add a new field for the user to store their token for next time. Just point your API call workflow to use the token. You can have the workflow generate a token first if the token field is empty.
Do take care to implement a way to allow the user to renew the token just in case.