Create a Connection
Next we want to actually start getting some data. To do this we need to create a Connection between a company on an accounting platform and SmoothIntegration.
Create a Connection through the Dashboard
Creating a connection can be done either through the Dashboard, or through the API/SDK. Using the dashboard is commonly only done during testing/development or one off connections. To create a new connection,
- Visit the SmoothIntegration Dashboard > Companies page
- Press the "..." button next to the company you want to create a connection for, and press "Add Connection"
- Select the desired accounting integration
- Share the consent URL with your user, or open it yourself if you're testing/developing yourself.
Create a Connection through the API
Commonly you want to create an experience where your users can Create a Connections themselves. This is commonly done by hosting a small server yourself. On this server you expose a route that when visited, redirects the users to the consent page. All the complexity of this is already handled by SmoothIntegration, so the implementation itself is rather straightforward.
- Create a simple server if you don't already have one
- Add a new GET endpoint
- Using the SmoothIntegration SDK, request a consent url for the appropriate company for this user
- Respond to the users request with a 302 Found response, redirecting them to the consent url
The user will then be asked to go through the authentication flow. Assuming they have the required authorization and consent to the connection, the connection will be created on SmoothIntegration. Once the connection is established, SmoothIntegration will automatically start retrieving the required information.