The Widget flow begins when your user wants to connect one of their data sources to your app.
  1. The user visits your website and initiates a connection.
  2. Your backend calls /link/token/create to generate a Link token and passes that token to the SDK parameters used on your frontend. The Link token is used to display the Widget.
  3. After the user submits their credentials, Deck sends back a temporary Job GUID to the Widget via the onSuccess function. This Job GUID must be sent to your backend and saved; it allows you to identify the Access token that comes shortly after.
  4. You will receive the Access token via a webhook, the URL of which you can setup in the Dashboard. The Job GUID is also present in the webhook, confirming the match between the credentials and the Access token.
  5. Store the Access token and use it to make product requests on behalf of your user.
It is imperative that you save the Job Guid in a way that allows you to recognize which connection it belongs to.
You can visualize the flow here: Widget flow diagram