查询AdSupplyForecast时在Linkedin API V2中获取403禁止

时间:2018-11-08 17:32:50

标签: linkedin linkedin-api linkedin-jsapi linkedin-j

我正在使用LinkedIn API V2,并且尝试从我的公司资料中查询AdSupplyForecast端点。我正在使用以下教程使用Targeting Criteria V2构建请求:

https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/advertising-targeting/ad-supply-forecasts

这是请求信息:

GET https://api.linkedin.com/v2/adSupplyForecasts?q=criteriaV2&campaignType=TEXT_AD&account=urn%3Ali%3AsponsoredAccount%3A2560807&timeRange=(start:1541691210720,end:1544283210720)&targetingCriteria=(include:(and:List((or:(urn%3Ali%3AadTargetingFacet%3Agenders:List(urn%3Ali%3Agender%3AMALE,urn%3Ali%3Agender%3AFEMALE)))))) HTTP/1.1
Host: api.linkedin.com
Authorization: Bearer xxxxxxx
X-Restli-Protocol-Version: 2.0.0

这是响应信息:

HTTP/1.1 403 Forbidden
X-Restli-Gateway-Error: true
Content-Type: application/json
Date: Thu, 08 Nov 2018 16:33:31 GMT
X-Li-Fabric: prod-lor1
Connection: keep-alive
X-Li-Pop: prod-efr5
X-LI-Proto: http/1.1
Set-Cookie: lidc="b=OB68:g=1068:u=602:i=1541694811:t=1541781211:s=AQGBKJna3VcsX87YCodNIDqiNNTr_AKi"
X-LI-Route-Key: "b=OB68:g=1068:u=602:i=1541694811:t=1541781211:s=AQGBKJna3VcsX87YCodNIDqiNNTr_AKi"
X-LI-UUID: FGtPJ0MzZRXgVVzfeCsAAA==
message:"Unpermitted fields present in PARAMETER: Data Processing Exception while processing fields [/account]"

当我尝试使用相同的帐户查询AdBudgetPricing终结点时,一切都按预期运行。

1 个答案:

答案 0 :(得分:0)

似乎此请求拒绝接受网址中的account参数,您可以删除此请求吗?

修改:
定位条件示例中的所有示例均包含“包含”和“排除”。
https://developer.linkedin.com/docs/ref/v2/ads/targeting-criteria-examples