A community member has associated this post with a similar question:
Share a file with external users using anonymousAccess by using sharepoint REST API
Only moderators can edit this content.
Using SharePoint REST API can we create a share link for specific external users
Using SharePoint REST API, i can do the following POST request to create an anonymous sharing link with password:-
1- Method:- POST
2- URL:- _api/web/Lists('ListGUID')/GetItemByID('1')?['ID']}')/Sharelink
3- Body:-
{
"request":{
"createLink":true,
"settings":{
"allowAnonymousAccess":true,
"linkKind":6,
"role":1,
"restrictShareMembership":false,
"updatePassword":true,
"password":"***",
"scope":0
}
}
}
this mimic this UI action for creating anonymous sharing link-
but how i can modify the Body parameters to create a link for specific users instead, which can be achieved from the UI using this action: -
any advice please?