$.ajax({
url: 'https://api.dropboxapi.com/2/sharing/add_folder_member',
type: 'POST',
processData: false,
data: JSON.stringify({"shared_folder_id": "84528192421","members": [{"member": {".tag": "email","email": "[email protected]"},"access_level": {".tag": "editor"}},{"member": {".tag": "dropbox_id","dropbox_id": "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q"},"access_level": {".tag": "viewer"}}],"quiet": false,"custom_message": "Documentation for launch day"}),
contentType: 'application/json',
headers: {
"Authorization": "Bearer <ACCESS_TOKEN>"
},
success: function(data) {
console.log(data);
},
error: function(data) {
console.error(data);
}
})
<ACCESS_TOKEN>
should be replaced with the OAuth 2 access token.