I state that I am a beginner regarding SharePoint Online. My question is to know if there is a way to upload a (PDF) file to SharePoint Online with php. Basically I own a site in drupal, so I would like to load PDF files through php code so as to integrate it into the site.

I've read this post (Using Linux Shell scripting to upload a document to SharePoint) , but I'm not sure how to use the answers or if they are right for me.

Can someone help me? Thank you

1 Answer 1


Use RESTAPI to upload the file. You should authenticate your client(this case PHP code)


I am not a PHP guy but I can see there are success stories. Give a try.


  • Thank you! It solved my problem
    – Hamza
    Oct 13, 2020 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.