I am trying to use the VisualStudioOnline REST API using python 3.6. (Plenty of examples using python 2.x.)
The python script response is the generic html login page.
In my experience with doing this via other similar mechanisms, you have to include a leading colon on the PAT, before base64 encoding.