How to decode the rest api file's data from SharePoint ?

Karan Singh 0 Reputation points
2023-02-06T14:42:07.2066667+00:00

How to decode the Rest API file's data from SharePoint ?

Step-1 ) I have integrated my application with SharePoint(online)

Step-2 ) Calling rest API to get file's content from SharePoint

Sample:-

string sharepointSiteUrl = Convert.ToString("https://abc sharepoint.com/sites/SharePointIntegrattion/_api/web/GetFolderByServerRelativeUrl('/sites/SharePointIntegrattion/Shared%20Documents/Email')/Files('Document.docx')/$value?binaryStringResponseBody=true");

So from there I am getting the response as shown in the image

I just want to get the data in their actual format (docx, pdf or etc.)

User's image

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.