Test User
Test Users are the contact addresses (e.g. phone numbers, Chat identities) who can test the latest drafts of a Flow even if they aren't yet published.
Update the Test User resource of a Flow to allow the contacts that need to perform tests of unpublished drafts.
Property nameTypePIIDescription
Unique identifier of the flow.
Pattern: ^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
List of test user identities that can test draft versions of the flow.
The URL of this resource.
GET https://studio.twilio.com/v2/Flows/{Sid}/TestUsers
Property nameTypeRequiredPIIDescription
Unique identifier of the flow.
Pattern: ^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function fetchTestUser() {
_19 const testUser = await client.studio.v2
_19 .flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_19 console.log(testUser.sid);
_10 "sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers"
POST https://studio.twilio.com/v2/Flows/{Sid}/TestUsers
Each Test User identity can be up to 300 bytes.
Property nameTypeRequiredPIIDescription
Unique identifier of the flow.
Pattern: ^FW[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
TestUsersarray[string]required List of test user identities that can test draft versions of the flow.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function updateTestUser() {
_19 const testUser = await client.studio.v2
_19 .flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_19 .update({ testUsers: ["+14155551212", "+14155551213"] });
_19 console.log(testUser.sid);
_10 "sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers"