在邮递员中,我设置了简单的请求来访问 Azure DevOps API,通过 Azure AD 使用 OAuth 2.0 安全 https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view= azure-devops-rest-5.1 在 Azure AD 应用程序设置上,有权在用户同意的情况下访问 Azure DevOps API
我正在获取令牌,但是 Azure DevOps API 不断返回代码 203,并使用登录 html 而不是 json 响应。如果有任何建议,我将不胜感激
谢谢
邮递员请求
GET /[some_org]/_apis/projects?api=5.1 HTTP/1.1
Host: dev.azure.com
Authorization: Bearer [something]
User-Agent: PostmanRuntime/7.17.1
Accept: */*
Cache-Control: no-cache
Postman-Token: [something]
Accept-Encoding: gzip, deflate
Cookie: VstsSession=[something]
Referer: https://dev.azure.com/[some_org]/_apis/projects?api=5.1
Connection: keep-alive cache-control: no-cache
Run Code Online (Sandbox Code Playgroud)