小编Pra*_*ash的帖子

使用 Api Id 和 Api Key 进行 RestSharp 身份验证

我必须调用 Restful API,但我拥有的唯一详细信息是 API ID 和 API 密钥。

我正在尝试使用像这样的 Restsharp 库代码。

  var client = new RestClient("https://xxxxxxx");
  client.Authenticator = new HttpBasicAuthenticator("xxxxx", "yyyyyy");
Run Code Online (Sandbox Code Playgroud)

我收到 401 需要授权错误。

你能指出我正确的方向吗?

谢谢。

c# api rest restsharp

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

api ×1

c# ×1

rest ×1

restsharp ×1