Skip to content
Proud to collaborate with Microsoft for Startups

bling.refresh-token ​

Loads an existing Bling CloudConnection, exchanges its refresh_token for a fresh access/refresh pair at Bling, and persists the rotated credentials.

Rotate Bling OAuth credentials before they expire.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-bling
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization that owns the Bling connection
connection_uuiduuidYes—UUID of the Bling CloudConnection to refresh
actorstringNo—Caller identity (defaults to context.actor)

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization that owns the Bling connection
connection_uuiduuidYes—UUID of the Bling CloudConnection to refresh
actorstringNo—Caller identity (defaults to context.actor)
loaded_atstringNo—ISO-8601 timestamp the row was loaded
refreshed_atstringNo—ISO-8601 timestamp the refresh round-trip completed
new_expires_atstringNo—ISO-8601 expiry of the freshly-issued access_token
persisted_atstringNo—ISO-8601 timestamp the rotated tokens were persisted
completed_atstringNo—ISO-8601 timestamp of overall completion
failure_reasonstringNo—Why this run failed (on the failed branch)
failed_atstringNo—ISO-8601 timestamp of failure
_rotated_access_tokenstringNo——
_rotated_refresh_tokenstringNo——
_rotated_scopestringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—load_connectionRefresh request received
loadingNoNo—refreshLoading connection from database
persistingNoNo—completeWriting rotated tokens
refreshingNoNo—persistExchanging refresh_token at Bling
completedNoYesYes—Bling credentials rotated
failedNoYesNo—Bling refresh failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedload_connectionloading—
loadingrefreshrefreshing—
refreshingpersistpersisting—
persistingcompletecompleted—
initiatedfailfailed—
loadingfailfailed—
refreshingfailfailed—
persistingfailfailed—

Business Errors ​

CodeMessage Template
BLING_CONNECTION_NOT_FOUNDBling connection {connection_uuid} not found in organization
BLING_CONNECTION_WRONG_PROVIDERConnection {connection_uuid} is not a Bling connection
BLING_REFRESH_FAILEDBling refresh failed:
BLING_PERSIST_FAILEDPersisting rotated Bling tokens failed:

API Usage ​

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

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