Ever been greeted with a (401) Unauthorized when calling a SharePoint-APIs? I have and its not always clear why this happens. Especially when the application in question worked yesterday. This can happen if you have registered a client secret using the /_layouts/15/appregnew.