Is there a simple way to use a cURL request to the REST API to access a file on my Sharepoint account? For example

curl -i -H "Authorization: Bearer <some-key-here>" https://mysharepoint.com/_api/web/Lists

I have read all the documentation about authentication and authorization for apps, but in this case I don't have an "application" that I can register. I simply need an API key of some kind to use in REST requests. How can I use the REST API in this way?

1 Answer 1


The first you have to get auth cookies. The auth process you can see at the figure enter image description here

I don't think exists ready to use solution for this, but the following links may be useful for you:

  • Thanks for the explanation. Unfortunately those links both use PHP, which will not work for me. Do you know if there are any solutions like that in Java?
    – KJ50
    Commented Feb 12, 2015 at 0:29
  • There is really not so much, but I think you can start from this gist.github.com/mirontoli/3702971
    – Roman
    Commented Feb 13, 2015 at 15:45

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.