Basiq best practices
When integrating with the Basiq API, there are some best practices that play a crucial role in any applications success. These practices cover areas such as security considerations, UX, scalability etc. and have been tried and tested to ensure that you have all the necessary tools and guidelines for success.
🔑 The token you receive will expire after one hour (3600 seconds). Cache this token for global use: avoid re-authenticating separately for each user or connection, as this will cause scaling issues in your application.
📜 Consider your consent policy carefully: Any changes to your consent policy (e.g., adding new data scopes) will only apply to new user consents. Existing users will either be restricted to the original policy or need to re-consent.
🎯 Be specific and show value: Clearly outline why you are requesting user consent. The purpose defined in your consent policy will be displayed to users, so ensure it communicates the value your application provides.
- ⚠️ Minimize ad hoc refreshes: Excessive requests can overload bank websites, causing account lockouts or action from the bank.
- 🕒 Use job steps to monitor progress: Creating a new connection with the same credentials while one is already in progress will pause the new connection for 6 minutes to prevent account lockout issues.
- 🚫 Avoid bulk refreshes: Large-scale refreshes (e.g., via cron jobs) can overload bank websites. Instead, rely on the smart cache or confirm a connection has not recently been refreshed before initiating a new request.
- 🔍 Check the last refresh time: Use the `connection.lastUsed` attribute or the user’s jobs to determine the last refresh time and result. Ensure the connection is active before refreshing, as refreshing inactive connections will fail.
🚀 Use the Smart Cache
For ongoing daily refreshed data, request the Basiq team to enable the
smart cache feature. This background refresh mechanism is far more efficient than initiating daily Refresh Connection requests.
Note: OpenBanking connections are limited to 20 refreshes per day.
🛠️ Handling Jobs for Ongoing Data Access
Handling jobs correctly is essential for good UX
Providing users with a simple, intuitive experience requires proper handling of job statuses and error messages. These help you troubleshoot issues and communicate them effectively to users (e.g., new login credentials needed).
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, refer to our resources on handling jobs effectively.
🧹 Purging Connection Data
In addition to using our API,
connection data can be purged directly from the Dashboard. This feature allows you to manage user connections without direct API calls.
Steps to Purge Data from the Dashboard:
- Navigate to User Connections: Access the user's profile and locate the connections list.
- Identify the Connection: Find the connection with the unique Connection ID.
- Initiate the Purge: Click on the "Purge" button next to the relevant connection.
- Confirm the Purge: Approve the action to remove associated data. The Connection ID remains intact, allowing future refreshes.
🚧 Important: Purging is irreversible. Proceed with caution. The Dashboard feature adheres to the same permissions and security protocols as the API endpoint.
📢 Attention! If you have any issues, please reach out to our amazing support team.
Updated about 2 months ago
