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

Step Context



ExecutionStepContext Properties

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

The SID of the Account that created the ExecutionStepContext 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.


execution_sidSID<FN>

The SID of the context's Execution resource.

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

flow_sidSID<FW>

The SID of the Flow.

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

step_sidSID<FT>

The SID of the Step that the context is associated with.

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

urlstring<uri>

The absolute URL of the resource.


Fetch a single step context

fetch-a-single-step-context page anchor
GET https://studio.twilio.com/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context

Path parameters

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

The SID of the Flow with the Step to fetch.

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

ExecutionSidSID<FN>required

The SID of the Execution resource with the Step to fetch.

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

StepSidSID<FT>required

The SID of the Step to fetch.

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

Fetch Execution Step Context

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

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

Output

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


Rate this page: