Share with mailing?

  • 1
  • Question
  • Updated 2 years ago

Hello,

I want to share an item with sending mail then I send a request:

https://domain.sf-api.eu/sf/v3/Shares?notify=false&direct=false

{
  "ShareType":"Send",
  "Title":"Sample Send Share",
  "Items": [ { "Id":"fi29e762-1e1e-a3be-d14a-d32925030dd1" } ],
  "Recipients":[ { "User": { "Email": "pierre.dupont@domain.com" } } ],
  "ExpirationDate": "2017-09-29",
  "RequireLogin": false,
  "RequireUserInfo": false,
  "MaxDownloads": -1,
  "UsesStreamIDs": false
}


and I have the request response:

{
  "AliasID": "s77c8451ab794aa68",
  "ShareType": "Send",
  "Title": "Sample Send Share",
  "HasSentMessage": false,
  "SentMessageTitle": "",
  "RequireLogin": false,
  "RequireUserInfo": false,
  "CreationDate": "2017-09-05T07:22:42.933Z",
  "ExpirationDate": "2017-09-29T00:00:00Z",
  "MaxDownloads": -1,
  "TotalDownloads": 0,
  "IsViewOnly": false,
  "TrackUntilDate": "0001-01-01T05:00:00Z",
  "SendFrequency": 0,
  "SendInterval": 0,
  "LastDateSent": "0001-01-01T05:00:00Z",
  "IsConsumed": false,
  "IsRead": false,
  "IsArchived": false,
  "SendTool": "",
  "SendMethod": "",
  "UsesStreamIDs": false,
  "Uri": "https://domain.sharefile.eu/d-s77c8451ab794aa68";,
  "Signature": "",
  "ShareSubType": "None",
  "ShareAccessRight": {
    "DisplayText": "contrôle total",
    "AccessRightType": "FullControl",
    "odata.type": "ShareFile.Api.Models.ShareAccessRight",
    "Id": ""
  },
  "IrmProtected": false,
  "odata.metadata": "
https://domain.sf-api.eu/sf/v3/$metadata#Shares/ShareFile.Api.Models.Share@Element";,
  "odata.type": "ShareFile.Api.Models.Share",
  "Id": "s77c8451ab794aa68",
  "url": "
https://domain.sf-api.eu/sf/v3/Shares(s77c8451ab794aa68)";
}

The sending isn't working. The Id item and the email address are checked.

Where is the error?

Thank.


Sylver

Photo of Sylver

Sylver

  • 16 Posts
  • 1 Reply Like

Posted 2 years ago

  • 1
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Software Engineer

  • 733 Posts
  • 102 Reply Likes
Hi Sylver,

If you'd like ShareFile to send the link email on your behalf, please use the "Deliver Send a File Email" endpoint:

POST https://account.sf-api.com/sf/v3/Shares/Send

  "Items":["itemId1", "itemId2", ...], 
  "Emails":["email@sharefile.com", "email2@sharefile.com",...] 
  "Subject": "Email Subject", 
  "Body": "Email Message", 
  "CcSender": false, 
  "NotifyOnDownload": true, 
  "RequireLogin": false, 
  "MaxDownloads": 30, 
  "ExpirationDays": -1 



Thanks!
Eli
(Edited)
Photo of Sylver

Sylver

  • 16 Posts
  • 1 Reply Like

Hi Eli,

The "Deliver Send a File Email" endpoint is working :)

Why is the mailing not working with the "Create Share" endpoint? I see the emails in mailbox sents in the sharefile web but the emails didn't sent to their destination?

Wtih the "Deliver Send a File Email" endpoint, how do I know that the emails are really sent? HasSentMessage is always false after the launch.


Thank you for rour reply.

Sylver