Hi @Sachin ,
In your code, the requestUri is not right. Try to change it to the below:
var requestUri ="https://xxx.sharepoint.com/sites/<projects site>/_api/web/lists/getByTitle('Test Project Documents')/items?$select=EncodedAbsUrl,*,File/Name&$expand=File";
Note: users need to have at lease read permission on the library to see the file. If users donot have permissions, you would get access denied in reponse.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.