FMQBO HTTP Client
Build a FileMaker Script that can make requests to the QuickBooks Online API, handling OAuth token refresh, error handling, and proper request URLs.
Goal
Build a script that can handle all our HTTP requests to the QuickBooks Online API
Why?
By building a single script that can handle all our HTTP requests, we can:
- Centralize our error handling
- Handle token refresh in a single place
- Centralize our request logging
- Reduce the amount of code we need to write and maintain
Request Flow
The following diagram illustrates the complete request flow, including token refresh and error handling. Our script will need to follow this pattern
This flow ensures that:
- Tokens are refreshed when needed
- 401 responses trigger a token refresh
- Failed requests return proper error objects
- Successful requests return the response body