You will use both the client-side component, Connect, and a server to access the Arc APIs. See the Quickstart section for a functional example. The flow works like this:
- For a user that you'd like to connect to the Arc platform, determine a unique key that you'll use to identify that user within Arc API responses. It can be the user's unique ID in your database or some other unique identifier. This key is referred to as the
client_user_idin the API.
- Make a
/auth/connect_tokenfrom your server, specifying the user's
client_user_idin the request body in order to fetch a Connect Token scoped to that user.
- Provide that Connect Token as a parameter when opening Connect for the user.
- After the user submits their credentials, Connect will call the
onCredentialsSubmittedcallback with the unique
utilityCredentialIdgenerated for this user's credential to the specified utility. You can optionally pass this as
utility_credential_idinstead of a
client_user_idwhen creating a Connect Token if you ever need the user to update their credentials.
- Listen for webhooks that reference the specified
client_user_idor make requests API endpoints using that
client_user_idto retrieve or analyze data specific to the user.