I'm using Office 365 SharePoint and I need to be able to upload a file to a specific SharePoint document list from a website running on a non SharePoint server. I've read dozens and dozens of theoretical posts about this, but none of them give concrete examples of how it is actually done from start to finish.
I may be heading in the wrong direction here, but so far I have registered an app on my SharePoint site at this URL https://www.MySharePointSite/_layouts/15/appregnew.aspx
and I have a client_id and client_secret for the app. Using these 2 id's, I retrieved some sort of code from here https://www.MySharePointSite/_layouts/15/OAuthAuthorize.aspx?client_id={client_id}&scope=Web.Write&response_type=code}
. Now it looks like the next step is to use this code to get an access token that is needed to make REST calls to access my SharePoint documents, which leads me to my question. What is the URL to get this access token? I've seen several different partially-formed URLs to get an access token, none of which I can figure out.
I am not using C# or Visual Studio for any of this, so the C# libraries to do all of this will be of no use to me, I just need the URL and parameters needed to retrieve an access token. Any info at all will be much appreciated.