How to fix VSTS API 400 bad request DelegatedAuthorizationException
How to fix VSTS API 400 bad request DelegatedAuthorizationException Real quick, I was integrated with the VSTS (Visual Studio Team Services) API by calling https://app.vssps.visualstudio.com/oauth2/authorize… and I was getting the following:
400 Bad Request:
Exception of type ‘Microsoft.VisualStudio.Services.Web.Profile.Controllers.DelegatedAuthorizationException’ was thrown.
Not a super helpful error message, but the fix was simple.
- Make sure all your parameter names are spelled correctly, and that the redirect_uri parameter matches exactly what you defined when you registered your app here: https://app.vssps.visualstudio.com/app/register
- The redirect URI that you registered and the paramater your passing in both have to be HTTPS.