http对代码参数请求的响应为500



这是对https://auth.monday.com/oauth2/authorizeasp.net 6上的端点。它应该从该端点获取代码参数,但由于某种原因,它返回了一个带有html的500响应。这是我的代码授权流的一部分,因为API有oauth2.0。

public async Task<string> GetCode(string clientId, string redirect_uri)
{
HttpClient client = new HttpClient();    
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, $"https://auth.monday.com/oauth2/authorize{clientId}");

string json =
JsonSerializer.Serialize(
new
{
query = "code"
}
);
request.Content = new StringContent(json,
Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var responseText = await response.Content.ReadAsStringAsync();
return responseText;
}

您的端点中是否可能缺少/?应该不是https://auth.monday.com/oauth2/authorize/{clientId}吗?

HTTP 500是一个内部服务器错误,这意味着服务器无法正确处理您的请求。如果你有权访问服务器,那么我会看看为什么它无法处理你的请求。我看不出你的要求有什么不妥。