C#中的GetResponse API版本-3的标题(MVC-5)

时间:2016-03-02 16:05:08

标签: c# api rest curl getresponse

当我收到错误时,我有点困惑:

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}

1 个答案:

答案 0 :(得分:1)

使用APIKEY代替AuthorizationKey