Basiq best practices
Apply these practices to manage authentication, consent, connection refreshes, and user data in your Basiq API integration.
Cache your authentication token
The token you receive expires after one hour (3600 seconds).
Cache and reuse this token globally. Reuse it across users and connections. Avoid generating a separate token for each user or connection, as this creates unnecessary authentication requests and can lead to scaling issues.
Configure your consent policy
Review your consent policy before making changes. Changes apply only to new user consents. This includes adding data scopes (permissions to access specific types of data). Existing users either keep their original consent policy or need to consent again.
Explain why you request consent. Your consent policy shows users the purpose you define. Describe how your application uses their data and the value they receive.
Manage connection refreshes
- Minimize ad hoc (on-demand) refreshes: Excessive requests can overload bank websites, causing account lockouts or action from the bank.
- Use job steps to monitor progress. If you create another connection with the same credentials while one is in progress, Basiq pauses the new connection for 6 minutes. This pause helps prevent account lockouts.
- Avoid bulk refreshes. Large-scale refreshes can overload bank websites. This includes refreshes from cron jobs (scheduled tasks). Use Smart Cache (a background data refresh mechanism) instead. Before requesting a refresh yourself, check when the connection last refreshed.
-
Check the last refresh time: Use
connection.lastUsed(the connection's last refresh time) or the user's job records. Check job records for the refresh result. Ensure the connection is active before refreshing; attempts to refresh inactive connections fail.
Use Smart Cache
Ask the Basiq team to enable Smart Cache for daily data refreshes.
This feature refreshes data in the background, so you can avoid initiating daily Refresh Connection requests.
Note: Open Banking (bank data sharing with user consent) allows up to 20 refreshes per connection per day.
Handle jobs for ongoing data access
Respond to job statuses and errors
Check job statuses and error messages to identify failures. Tell users what action to take, such as updating their login credentials.
Use the /job endpoint to monitor the status of recent jobs and address failures promptly.
Check jobs regularly
A typical cadence includes daily checks and checks during user login. This allows for timely resolution of errors. For instance:
- Users might need to update credentials.
- Banks may require acknowledging new terms or popup messages.
For more details, read Handling jobs.
Purge connection data
Purge (permanently delete) connection data from the Dashboard or through the Purge Connection Data API.
Use the Dashboard to purge data without making API calls.
Purge data from the Dashboard
- Navigate to user connections: Open the user's profile and locate the connections list.
- Identify the connection: Find the connection by its unique connection ID.
- Initiate the purge: Select the "Purge" button next to the connection.
- Confirm the purge: Approve the action to permanently delete the connection's data. The connection ID stays the same. You can refresh the connection again later.
🚧 Important: Purging is irreversible. Proceed with caution. The Dashboard feature adheres to the same permissions and security protocols as the API endpoint.
Contact support
Contact Basiq support if you encounter issues.
Updated 7 days ago