Sync Map Permission Resource
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
.
Resource properties
The SID of the Sync Map to which the Permission applies.
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 Map and its Items.
Whether the identity can create, update, and delete Items in the Sync Map.
Whether the identity can delete the Sync Map.
The absolute URL of the Sync Map Permission resource.
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}
URI parameters
Path Parameter
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
.
Path Parameter
The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch.
_12// Download the helper library from https://www.twilio.com/docs/node/install
_12// Find your Account SID and Auth Token at twilio.com/console
_12// and set the environment variables. See http://twil.io/secure
_12const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12const authToken = process.env.TWILIO_AUTH_TOKEN;
_12const client = require('twilio')(accountSid, authToken);
_12client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .syncMaps('MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .syncMapPermissions('identity')
_12 .then(sync_map_permission => console.log(sync_map_permission.serviceSid));
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "map_sid": "MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "identity": "identity",
_10 "url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Permissions/identity"
GET https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions
URI parameters
Path Parameter
The SID of the Sync Map with the Permission resources to read. Can be the Sync Map resource's sid
or its unique_name
.
Query Parameter
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Query Parameter
The page index. This value is simply for client state.
Query Parameter
The page token. This is provided by the API.
_12// Download the helper library from https://www.twilio.com/docs/node/install
_12// Find your Account SID and Auth Token at twilio.com/console
_12// and set the environment variables. See http://twil.io/secure
_12const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12const authToken = process.env.TWILIO_AUTH_TOKEN;
_12const client = require('twilio')(accountSid, authToken);
_12client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .syncMaps('MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .then(syncMapPermissions => syncMapPermissions.forEach(s => console.log(s.serviceSid)));
_23 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "map_sid": "MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "identity": "identity",
_23 "url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Permissions/identity"
_23 "first_page_url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=0",
_23 "key": "permissions",
_23 "next_page_url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=1",
_23 "previous_page_url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=0",
_23 "url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/sidOrUniqueName/Permissions?PageSize=50&Page=0"
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.
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.
URI parameters
Path Parameter
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
.
Path Parameter
The application-defined string that uniquely identifies the User's Sync Map Permission resource to update.
Request body parameters
Required
Whether the identity can read the Sync Map and its Items. Default value is false
.
Required
Whether the identity can create, update, and delete Items in the Sync Map. Default value is false
.
Required
Whether the identity can delete the Sync Map. Default value is false
.
_12// Download the helper library from https://www.twilio.com/docs/node/install
_12// Find your Account SID and Auth Token at twilio.com/console
_12// and set the environment variables. See http://twil.io/secure
_12const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12const authToken = process.env.TWILIO_AUTH_TOKEN;
_12const client = require('twilio')(accountSid, authToken);
_12client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .syncMaps('MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .syncMapPermissions('identity')
_12 .update({read: true, write: true, manage: true})
_12 .then(sync_map_permission => console.log(sync_map_permission.serviceSid));
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "map_sid": "MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "identity": "identity",
_10 "url": "https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Maps/MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Permissions/identity"
DELETE https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}
URI parameters
Path Parameter
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
.
Path Parameter
The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete.
_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
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .syncMaps('MPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .syncMapPermissions('identity')