Skip to contentSkip to navigationSkip to topbar
Rate 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
Resource properties
sidtype: SID<FW>Not PII

Unique identifier of the flow.


test_userstype: string[]Not PII

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


urltype: string<URI>Not PII

The URL of this resource.


Fetch a TestUser resource

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

Parameters

fetch-parameters page anchor
URI parameters
Sidtype: SID<FW>Not PII
Path Parameter

Unique identifier of the flow.

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

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.testUsers()
_11
.fetch()
_11
.then(flow_test_user => console.log(flow_test_user.sid));

Output

_10
{
_10
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"test_users": [
_10
"user1",
_10
"user2"
_10
],
_10
"url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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.

URI parameters
Sidtype: SID<FW>Not PII
Path Parameter

Unique identifier of the flow.


Request body parameters
TestUserstype: string[]Not PII
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

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.testUsers()
_11
.update({testUsers: `["+14155551212","+14155551213"]`})
_11
.then(flow_test_user => console.log(flow_test_user.sid));

Output

_10
{
_10
"sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"test_users": "[\"+14155551212\",\"+14155551213\"]",
_10
"url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/TestUsers"
_10
}


Rate this Page: