How to download a file from Sharepoint via REST API (postman) ?

Boaz Benicio 6 Reputation points


I need to download some pdf files from Sharepoint via API but it's not working.

The API response returns a 404 error, stating the file doesn't exist. We tried it by using the GetFileByServerRelativePath method .


Please verify the attached error:


SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,655 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,569 questions
{count} vote

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 30,916 Reputation points Microsoft Vendor

    Hi @Boaz Benicio
    Per my test, I can get the pdf file by following url'/sites/xiexin/account/SOFA%20DIGITAL%20BRASIL%20LICENCIAMENTO%20E%20CESSAO%20DE%20CONTEUDOS%20LTDA_1450D19E8615EC11B6E7000D3A885B24/11309250A_Proposta_Tecnica%26Comercial_12meses_Matrix_SofaDigital_2021-10-28.pdf')/$value  

    Please check your path in ( )

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

  2. Prabhu 1 Reputation point

    Hi Raytheon Xie,
    I think he wants to know how to download the PDF, and not see it in a text/Unicode format. Not sure if you understood Sumit-5254's question

    0 comments No comments