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

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.


TestUser Properties

testuser-properties page anchor
Property nameTypePIIDescription
sidSID<FW>
Not PII

Unique identifier of the flow.

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

test_usersarray[string]

List of test user identities that can test draft versions of the flow.


urlstring<uri>

The URL of this resource.


Fetch a TestUser resource

fetch-a-testuser-resource page anchor
GET https://studio.twilio.com/v2/Flows/{Sid}/TestUsers

Path parameters

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

Unique identifier of the flow.

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

Fetch Test Users

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

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

Output

_10
{
_10
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"test_users": [
_10
"user1",
_10
"user2"
_10
],
_10
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers"
_10
}


Update a TestUser resource

update-a-testuser-resource page anchor
POST https://studio.twilio.com/v2/Flows/{Sid}/TestUsers

Each Test User identity can be up to 300 bytes.

Property nameTypeRequiredPIIDescription
SidSID<FW>required

Unique identifier of the flow.

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

List of test user identities that can test draft versions of the flow.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function updateTestUser() {
_19
const testUser = await client.studio.v2
_19
.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_19
.testUsers()
_19
.update({ testUsers: ["+14155551212", "+14155551213"] });
_19
_19
console.log(testUser.sid);
_19
}
_19
_19
updateTestUser();

Output

_10
{
_10
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"test_users": [
_10
"user1",
_10
"user2"
_10
],
_10
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TestUsers"
_10
}


Rate this page: