Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Execution Context



ExecutionContext Properties

executioncontext-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The SID of the Account that created the ExecutionContext resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

contextobject
PII MTL: 30 days

The current state of the Flow's Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.


flow_sidSID<FW>

The SID of the Flow.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

execution_sidSID<FN>

The SID of the context's Execution resource.

Pattern: ^FN[0-9a-fA-F]{32}$Min length: 34Max length: 34

urlstring<uri>

The absolute URL of the resource.


Fetch a single execution context

fetch-a-single-execution-context page anchor
GET https://studio.twilio.com/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
FlowSidSID<FW>required

The SID of the Flow with the Execution context to fetch.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

ExecutionSidSID<FN>required

The SID of the Execution context to fetch.

Pattern: ^FN[0-9a-fA-F]{32}$Min length: 34Max length: 34

Fetch Execution Context

fetch-execution-context page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function fetchExecutionContext() {
_20
const executionContext = await client.studio.v2
_20
.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_20
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_20
.executionContext()
_20
.fetch();
_20
_20
console.log(executionContext.accountSid);
_20
}
_20
_20
fetchExecutionContext();

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"context": {
_10
"foo": "bar"
_10
},
_10
"flow_sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"execution_sid": "FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
_10
}


Rate this page: