连接到Linkedin adAnalytics API-参数

时间:2019-09-16 13:24:24

标签: postman linkedin linkedin-api

我无法连接到LinkedIn AdAnalytics API。使用邮递员测试我的连接时-我收到错误消息:

{
    "serviceErrorCode": 100,
    "message": "Unpermitted fields present in PARAMETER: Data Processing Exception
                while processing fields [/daterange]",
    "status": 403
}

我可以验证自己是否可以访问。我可以在邮递员中使用Oath 2.0生成访问令牌。我使用https://docs.microsoft.com/en-us/linkedin/marketing/getting-started在邮递员上设置Oauth 2.0访问权限,并确保我对自己的应用拥有正确的权限。我正在使用以下范围进行访问。

r_organization_social, w_organization_social, rw_organization_admin,
rw_ads, r_ads_reporting, r_liteprofile

以下是使用V2符号https://docs.microsoft.com/en-us/linkedin/shared/api-guide/concepts/protocol-version?context=linkedin/marketing/context的示例:

enter image description here

这里是使用V1表示法https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#sample-request的示例。

enter image description here

两种表示法均无效。我是API的新手,所以我确定我缺少一些东西,但是我不确定它是什么。

1 个答案:

答案 0 :(得分:0)

如您所见,in the example可以将dateRange值作为单个参数传递给查询字符串,如下所示:

CAMPAIGN&dateRange.start.day=1&dateRange.start.month=1&dateRange.start.year=2017&timeGranularity=DAILY

编辑:请小心使用参数名称的camelCase版本,详细说明dateRange:在所有情况下都将daterange替换为dateRange,然后重试(我ve使用小写版本复制了错误)

希望获得帮助