I found there is something missing in your url. The url should be like following. If you miss the /sites/xxxx
,the api will get the library in the whole tenant, this will need global administrator
https://tenant.sharepoint.com/sites/xxxx/_api/web/GetFolderByServerRelativeUrl('/sites/xxxx/Shared Documents')
Please try to call the api again