Skip to main content

SECURE_SHARE API Reference

Module Information

Service Files:

  • Private: service/private/secure_share.js

Available Services: 4 Documented Services: 4


secure_share.create

Create a per-email unique secure share token for a file or folder. Stores the token in secure_share_token (yellow_page), sends an invitation email to the recipient, and returns the share link.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)
LoggingEnabled

Endpoint:

https://hostname/-/svc/secure_share.create

Parameters

ParameterTypeRequiredDefaultDescription
nidstringYes-Node ID of the file or folder to share
emailstringYes-Recipient email. Access is restricted to this address unless domain_restriction is also set.
domain_restrictionstringNo-Optional domain restriction (e.g. company.com). When set, any email from that domain may use the link.
daysintegerNo0Expiry in days, combined with hours. 0 means no expiry.
hoursintegerNo0Expiry in hours, combined with days. 0 means no expiry.
passwordstringNo-Optional password the recipient must enter after email verification. Communicated out-of-band. Stored as salted PBKDF2-SHA512 hash — never in plain text.

Returns

FieldTypeDescription
idstringUnique share token
linkstringFull share URL to send to the recipient
recipient_emailstring-
expiry_timeintegerUnix timestamp, 0 = no expiry

Possible Errors

Error CodeHTTP StatusDescription
CREATE_FAILED-Token creation failed
MISSING_PARAM400nid and email are required

secure_share.list

List all secure share tokens created by the current user for a given node, including status (active / expired / revoked) and access counts.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/secure_share.list

Parameters

ParameterTypeRequiredDefaultDescription
nidstringYes-Node ID to list secure share tokens for

secure_share.revoke

Revoke a secure share token (soft delete — sets revoked_at timestamp). Broadcasts a secure_share_revoked event via Redis to all hub socket connections so the recipient loses access instantly.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)
LoggingEnabled

Endpoint:

https://hostname/-/svc/secure_share.revoke

Parameters

ParameterTypeRequiredDefaultDescription
tokenstringYes-Secure share token to revoke

secure_share.delete

Hard-delete a secure share token. Only succeeds when the token is already revoked or expired — active tokens are rejected.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)
LoggingEnabled

Endpoint:

https://hostname/-/svc/secure_share.delete

Parameters

ParameterTypeRequiredDefaultDescription
tokenstringYes-Token to permanently delete. Must already be revoked or expired.