1

I have an attachment with "Anyone with link" sharing configuration. How can I retrieve (or construct) the actual sharing URL using the rest API?

E.g., I have an attachment with id: 069240000009bdU and ViewAll permissions through Rest API. From UI (web) I can see that its URL is: https://eu5.salesforce.com/sfc/p/24000000Iv3d/a/240000004F9m/Hvn9E4Bsh19gqu0BLW7AKRCqa48rilU8pSTVEq5HuXU

How can I get this URL through Rest API?

1

If you could consider switching over to using Content rather than Attachment then you can use the ContentDistribution.DistributionPublicUrl. This is circa Winter 15 and the idea Allow Content Deliveries to be programmatically generated via Apex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.