简体   繁体   English

通过 LinkedIn API V2 创建广告创意不起作用

[英]Create an Ad Creatives over LinkedIn API V2 not working

I use the api version 2.0 and want to create an ad creatives https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#create-a-sponsored-content-share我使用 api 版本 2.0 并想创建一个广告创意https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#create-a -赞助内容分享

PHP Code PHP代码

    POST https://api.linkedin.com/v2/adCreativesV2

    {
      "campaign": "urn:li:sponsoredCampaign:XXXXXXXX",
      "reference": "urn:li:share:XXXXXXXXXXXXX",
      "status": "ACTIVE",
      "type": "SPONSORED_STATUS_UPDATE",
      "variables": {
          "data": {
              "com.linkedin.ads.SponsoredUpdateCreativeVariables": {
                  "directSponsoredContent": true,
                  "share": "urn:li:share:XXXXXXXXXX",
                  "activity": "urn:li:activity:XXXXXXXXXXX"
              }
          }
      }
   }

API response API 响应

{"message":"Your application is not configured to access the related advertiser account(s), please ensure you have added the account ID(s) in your Account Management list.","status":403}

Any idea, How to fix this error?任何想法,如何解决这个错误?

Try with an empty object for the SponsoredUpdateCreativeVariables variable as in the example in the doc :尝试使用SponsoredUpdateCreativeVariables变量的空对象,如文档中的示例所示

{
  "campaign": "urn:li:sponsoredCampaign:XXXXXXXX",
  "reference": "urn:li:share:XXXXXXXXXXXXX",
  "status": "ACTIVE",
  "type": "SPONSORED_STATUS_UPDATE",
  "variables": {
      "data": {
          "com.linkedin.ads.SponsoredUpdateCreativeVariables": {}
      }
  }

} }

There is no issue with the request, you are using Ad account id which don't have access to your developer application, been faced the same issue.请求没有问题,您使用的广告帐户 ID 无权访问您的开发者应用程序,遇到了同样的问题。 You need to add your account id in the developer application.您需要在开发者应用程序中添加您的帐户 ID。 its working for me.它为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM