The Sync Map 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 Map Permission resource is the same as setting all permissions to false
.
The SID of the Account that created the Sync Map Permission resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Sync Service the resource is associated with.
^IS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Sync Map to which the Permission applies.
^MP[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 create, update, and delete Items in the Sync Map.
The absolute URL of the Sync Map Permission resource.
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}
The SID of the Sync Service with the Sync Map Permission resource to fetch. Can be the Service's sid
value or default
.
The SID of the Sync Map with the Sync Map Permission resource to fetch. Can be the Sync Map resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchSyncMapPermission() {11const syncMapPermission = await client.sync.v112.services("ServiceSid")13.syncMaps("MapSid")14.syncMapPermissions("Identity")15.fetch();1617console.log(syncMapPermission.accountSid);18}1920fetchSyncMapPermission();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"service_sid": "ServiceSid",4"map_sid": "MapSid",5"identity": "Identity",6"read": true,7"write": true,8"manage": true,9"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions/identity"10}
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions
The SID of the Sync Service with the Sync Map Permission resources to read. Can be the Service's sid
value or default
.
The SID of the Sync Map with the Permission resources to read. Can be the Sync Map resource's sid
or its unique_name
.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listSyncMapPermission() {11const syncMapPermissions = await client.sync.v112.services("ServiceSid")13.syncMaps("MapSid")14.syncMapPermissions.list({ limit: 20 });1516syncMapPermissions.forEach((s) => console.log(s.accountSid));17}1819listSyncMapPermission();
1{2"permissions": [],3"meta": {4"first_page_url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=0",5"key": "permissions",6"next_page_url": null,7"page": 0,8"page_size": 50,9"previous_page_url": null,10"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=0"11}12}
POST https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}
Updates the permissions of the sync map for the Identity
specified in the URL.
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.
The SID of the Sync Service with the Sync Map Permission resource to update. Can be the Service's sid
value or default
.
The SID of the Sync Map with the Sync Map Permission resource to update. Can be the Sync Map resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync Map Permission resource to update.
application/x-www-form-urlencoded
Whether the identity can read the Sync Map and its Items. Default value is false
.
Whether the identity can create, update, and delete Items in the Sync Map. Default value is false
.
Whether the identity can delete the Sync Map. Default value is false
.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateSyncMapPermission() {11const syncMapPermission = await client.sync.v112.services("ServiceSid")13.syncMaps("MapSid")14.syncMapPermissions("Identity")15.update({16manage: false,17read: false,18write: false,19});2021console.log(syncMapPermission.accountSid);22}2324updateSyncMapPermission();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"service_sid": "ServiceSid",4"map_sid": "MapSid",5"identity": "Identity",6"read": false,7"write": false,8"manage": false,9"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions/identity"10}
DELETE https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}
The SID of the Sync Service with the Sync Map Permission resource to delete. Can be the Service's sid
value or default
.
The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's sid
or its unique_name
.
The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteSyncMapPermission() {11await client.sync.v112.services("ServiceSid")13.syncMaps("MapSid")14.syncMapPermissions("Identity")15.remove();16}1718deleteSyncMapPermission();