Reputation: 127
Using Postman
error: Access denied
when using this url without /web : https://test.sharepoint.com/sites/testIntranet/_api/GetFolderByServerRelativeurl('testIntranet/BMT')/Files/add(url='114934-image.png',overwrite=true)
error:Cannot find resource for the request GetFolderByServerRelativeurl
Note: Access token is correct with full permissions.
Can anyone please let me know what is correct and what is wrong!
if the first URL is correct then how to get access permissions ? if the second URL is correct then how to add resources correctly ?
Upvotes: 1
Views: 6575
Reputation: 1
The url should be like following
_api/Web/GetFolderByServerRelativeUrl('/sites/abc/FolderTest/Test')/Files/add(url='filename.png',overwrite=true)')
You can upload file in body like following pic
Upvotes: 4