Implement the accounts.connected
webhook to know when a user authenticates with Argyle Link.
accounts.connected
is triggered when a user successfully authenticates an account via Argyle Link.
accounts.connected
is also triggered when the account is re-authenticated via Argyle Link for a second time, for example, due to the updated credentials.
Event
accounts.connected
Configuration
Attribute | Type | Description |
---|---|---|
include_resource | boolean optional | If set to true in the webhook subscription configuration, the webhook payload returns the full account object as resource . Defaults to false . |
Payload
Attribute | Type | Description |
---|---|---|
account | string uuid | ID of the connected account. |
user | string uuid | ID of the user associated with the account. |
resource | object | The full account object is returned if the webhook subscription contains "include_resource": true in the configuration. |
Examples
curl -X POST https://api.argyle.com/v1/webhooks \
-u api_key_id:api_key_secret \
-H "Content-Type: application/json" \
-d '{"events": ["accounts.connected"],
"secret": "<secret for signature verification>",
"name": "accounts.connected",
"config": { "include_resource": true },
"url": "https://webhook.site/url"}'
{
"event": "accounts.connected",
"name": "An account was connected",
"data": {
"account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
"user": "3823026e-a964-45f6-b201-6b8c096b30d3",
"resource": {
"id": "ada143be-3c90-4534-b7ea-9899674dc6e0",
"user": "3823026e-a964-45f6-b201-6b8c096b30d3",
"employers": [
"homedepot"
],
"..."
}
}
}