Skip to content
Proud to collaborate with Microsoft for Startups

bling.refresh-token-due ​

Scans active Bling connections, refreshes any whose access_token expires within window_minutes. Designed to be invoked on a schedule so tokens never silently expire mid-API call.

Cron-style sweep that refreshes Bling tokens nearing expiry.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-bling
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Org to scan. Required even though the scan is org-scoped — workflow engine resolves session per-org.
window_minutesintegerNo—Refresh tokens expiring within this many minutes. Default 30.
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Org to scan. Required even though the scan is org-scoped — workflow engine resolves session per-org.
window_minutesintegerNo—Refresh tokens expiring within this many minutes. Default 30.
actorstringNo——
scanned_countintegerNo—Total Bling connections found in the organization
eligible_countintegerNo—Count within the refresh window
refreshed_countintegerNo—Successful refresh-token workflow runs
failed_countintegerNo——
resultsjsonNo—[{connection_uuid, workflow_uuid, status, expires_at}, ...]
started_atstringNo——
completed_atstringNo——
failure_reasonstringNo——
failed_atstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—scanScheduled scan started
completedNoYesYes—Scan completed
failedNoYesNo—Scan failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedscancompleted—
initiatedfailfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "bling.refresh-token-due",
  "initial_data": {
    "organization_uuid": "value"
  }
}