【发布时间】:2016-06-15 14:33:45
【问题描述】:
当我收到错误时,我有点困惑:
Problem during authentication process, check headers!
Unable to authenticate user, incorrect token
请求头肯定有问题。
谁能告诉我向GetResponse API 发送请求的正确方法?
我是这样用的:
var request = new RestRequest("/campaigns", Method.GET);
request.AddHeader("X-Auth-Token", "api-key " + auth.myAuthorizationKey);
调试时请求中的标头如下所示:
{X-Auth-Token=api-key d042eeae34ce076913681cc5c872741e2c5f88d2}
【问题讨论】:
-
为什么要在令牌中添加
api-key? -
因为它在 Authentication Heading 下的documentation 中
-
我知道 auth.AuthorizationKey 值有问题。在 api-key 中我们必须传递什么 TOKEN 或 API KEY ??? API KEY 是显示在 Accounts->API & oAuth 页面顶部的那个。
-
那你必须通过
API KEY
标签: c# api rest curl getresponse