Allow a domain for collaboration
Allow a domain for collaboration
An enterprise that normally restricts creating collaborations can
add domains, such as example.com
, to a list for which collaborations may be
created within the enterprise.
cURL
curl -i -X POST "https://api.box.com/2.0/collaboration_whitelist_entries" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"direction": "inboud"
}'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
"example.com",
"both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);
The
endpoint
will require the domain
to allow the collaborations between, and a
direction
, which may be set to:
inbound
: Whether external users may be collaborated in on content in your enterprise.outbound
: Whether your enterprise managed users may be collaborated in on content owned within an external enterprise.both
: Both of the above.
Supply both parameter to set up the new allowed domain.
cURL
curl -i -X POST "https://api.box.com/2.0/collaboration_whitelist_entries" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"direction": "inboud"
}'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
"example.com",
"both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);