Sync List Permission Resource
The Sync List Permission resource represents the permissions that apply to any SDKs authenticated with a matching Identity
specified in the Auth Token.
Permissions bind an identity to an object with flags that specify the permission to read, write, and manage the object. Permissions do not have a SID or a unique path; instead, they are identified by the Service
, Object
, and Token Identity
specified in the URL.
Permissions can be updated, fetched, and read. Deleting a Sync List Permission resource is the same as setting all permissions to false
.
Property nameTypePIIDescription
The SID of the Account that created the Sync List Permission resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Sync Service the resource is associated with.
Pattern: ^IS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Sync List to which the Permission applies.
Pattern: ^ES[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The application-defined string that uniquely identifies the resource's User within the Service to an FPA token.
Whether the identity can read the Sync List and its Items.
Whether the identity can create, update, and delete Items in the Sync List.
Whether the identity can delete the Sync List.
The absolute URL of the Sync List Permission resource.
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}
Property nameTypeRequiredPIIDescription
The SID of the Sync Service with the Sync List Permission resource to fetch.
The SID of the Sync List with the Sync List Permission resource to fetch. Can be the Sync List resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch.
_20// Download the helper library from https://www.twilio.com/docs/node/install
_20const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20// Find your Account SID and Auth Token at twilio.com/console
_20// and set the environment variables. See http://twil.io/secure
_20const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20const authToken = process.env.TWILIO_AUTH_TOKEN;
_20const client = twilio(accountSid, authToken);
_20async function fetchSyncListPermission() {
_20 const syncListPermission = await client.sync.v1
_20 .services("ServiceSid")
_20 .syncLists("ListSid")
_20 .syncListPermissions("Identity")
_20 console.log(syncListPermission.accountSid);
_20fetchSyncListPermission();
_10 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10 "service_sid": "ServiceSid",
_10 "list_sid": "ListSid",
_10 "identity": "Identity",
_10 "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions/identity"
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions
Property nameTypeRequiredPIIDescription
The SID of the Sync Service with the Sync List Permission resources to read.
The SID of the Sync List with the Sync List Permission resources to read. Can be the Sync List resource's sid
or its unique_name
.
Property nameTypeRequiredPIIDescription
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_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 listSyncListPermission() {
_19 const syncListPermissions = await client.sync.v1
_19 .services("ServiceSid")
_19 .syncLists("ListSid")
_19 .syncListPermissions.list({ limit: 20 });
_19 syncListPermissions.forEach((s) => console.log(s.accountSid));
_19listSyncListPermission();
_12 "first_page_url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/sidOrUniqueName/Permissions?PageSize=50&Page=0",
_12 "key": "permissions",
_12 "next_page_url": null,
_12 "previous_page_url": null,
_12 "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/sidOrUniqueName/Permissions?PageSize=50&Page=0"
POST https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}
Updates the permissions of the document for the Identity
specified in the URL.
Warning
Permissions only take effect if the ACLEnabled
flag is set on your Service instance.
Your servers are always in "God Mode", meaning they have full access to all your account's Sync resources regardless of the value of the Service's ACLEnabled
flag or how the Permissions are configured.
Property nameTypeRequiredPIIDescription
The SID of the Sync Service with the Sync List Permission resource to update.
The SID of the Sync List with the Sync List Permission resource to update. Can be the Sync List resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync List Permission resource to update.
Property nameTypeRequiredPIIDescription
Whether the identity can read the Sync List and its Items. Default value is false
.
Whether the identity can create, update, and delete Items in the Sync List. Default value is false
.
Whether the identity can delete the Sync List. Default value is false
.
_24// Download the helper library from https://www.twilio.com/docs/node/install
_24const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_24// Find your Account SID and Auth Token at twilio.com/console
_24// and set the environment variables. See http://twil.io/secure
_24const accountSid = process.env.TWILIO_ACCOUNT_SID;
_24const authToken = process.env.TWILIO_AUTH_TOKEN;
_24const client = twilio(accountSid, authToken);
_24async function updateSyncListPermission() {
_24 const syncListPermission = await client.sync.v1
_24 .services("ServiceSid")
_24 .syncLists("ListSid")
_24 .syncListPermissions("Identity")
_24 console.log(syncListPermission.accountSid);
_24updateSyncListPermission();
_10 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10 "service_sid": "ServiceSid",
_10 "list_sid": "ListSid",
_10 "identity": "Identity",
_10 "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions/identity"
DELETE https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}
Property nameTypeRequiredPIIDescription
The SID of the Sync Service with the Sync List Permission resource to delete.
The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync List Permission resource to delete.
_18// Download the helper library from https://www.twilio.com/docs/node/install
_18const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18// Find your Account SID and Auth Token at twilio.com/console
_18// and set the environment variables. See http://twil.io/secure
_18const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18const authToken = process.env.TWILIO_AUTH_TOKEN;
_18const client = twilio(accountSid, authToken);
_18async function deleteSyncListPermission() {
_18 .services("ServiceSid")
_18 .syncLists("ListSid")
_18 .syncListPermissions("Identity")
_18deleteSyncListPermission();