skip to Main Content

I use the api version 2.0 and want to create an ad creatives https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#create-a-sponsored-content-share

PHP Code

    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

{"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?

2

Answers


  1. Try with an empty object for the SponsoredUpdateCreativeVariables variable as in the example in the doc:

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

    }

    Login or Signup to reply.
  2. 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. You need to add your account id in the developer application. its working for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search