LinkedIn V2 API Marketing Developer Platform - Get data for ugcPost reference URN returning 500 error

Proctor, Kevin (SYD-KSO) 1 Reputation point
2021-08-02T02:38:40.23+00:00

Hi,

I'm using the LinkedIn v2 API to extract all creatives from the Marketing Developer Platform that I have access to as I am trying to build a meta data table for this object.

In my GET request I am using the projection parameter to decorate my response and retrieve the underlying data for each "reference", like the creative name for example. Now this works fine for all Sponsored Status Updates, but not for Sponsored Videos. The API is returning a 500 status with the message:

"URN Resolution failed for unknown reasons.: com.linkedin.r2.RemoteInvocationException: GatewayException{_serviceErrorCode=null}".

To try and investigate this further I tried to pull the data for just 1 particular creative, but even then I'm getting the above result.

See here my Python code snippet that I'm getting from Postman:

import requests

url = "https://api.linkedin.com/v2/adCreativesV2/124702736?projection=(reference~)"

payload={}
headers = {
  'X-RestLi-Protocol-Version': '2.0.0',
  'Authorization': 'Bearer ...',
  'Cookie': '...'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

This is the API response I'm getting back:

{
    "reference": "urn:li:ugcPost:6806391380584337408",
    "reference!": {
        "message": "URN Resolution failed for unknown reasons.: com.linkedin.r2.RemoteInvocationException: GatewayException{_serviceErrorCode=null}",
        "status": 500
    }
}

I would love to find out how to get this to work as I've tried all sorts of things, but nothing is working. Any help would be greatly appreciated.

Thanks,
Kevin

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
402 questions
0 comments No comments
{count} votes