CreateLink Method
Creates a shared link.
Syntax
ANSI (Cross Platform) char* CreateLink(const char* lpszResourceId); Unicode (Windows) LPWSTR CreateLink(LPCWSTR lpszResourceId);
- (NSString*)createLink:(NSString*)resourceId;
#define MID_BOX_CREATELINK 7 IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_Box_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This method creates a shared link for the resource specified by ResourceId. The URL of the shared link is returned.
Only one shared link may be active at a time for each resource; calling this method for a resource that already has an active shared link will update the shared link's settings without changing its URL.
The following configuration settings may be used to configure the shared link:
// Create a password-protected shared link for the given file. box.Config("CreateLinkPassword=password"); string sharingUrl = box.CreateLink("f:09876");
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.