Hi all, i want to run some SharePoint
operation (not 365) trow java with rest-api, I succeed to run get operations like list, or download file. but when I try to run post operation like "checkout" I'm getting error 401.
I saw that i need "Authorization: "Bearer " + accessToken" but i couldn't find how to get access token with Java.
this is what I need to run: url: http://site
url/_api/web/lists/getbytitle('list title')/items(item id)/AttachmentFiles/ add(FileName='file name') method: POST headers: Authorization: "Bearer " + accessToken body: "Contents of file." X-RequestDigest: form digest value content-length:length of post body.
Thanks in advance,