Search code examples
postmanlinkedin-api

Connecting to Linkedin adAnalytics API - Unpermitted fields present in parameter


I am having trouble connecting to the LinkedIn AdAnalytics API. While using postman to test my connection - I receive the error:

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

I can verify I have access. I am able to generate the access token with Oath 2.0 in postman. I used https://learn.microsoft.com/en-us/linkedin/marketing/getting-started to setup Oauth 2.0 access on postman and make sure I have the right permissions on my app. I am using the following scopes for my access.

r_organization_social, w_organization_social, rw_organization_admin,
rw_ads, r_ads_reporting, r_liteprofile

Here is an example of using the V2 notation https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts/protocol-version?context=linkedin/marketing/context:

enter image description here

Here is an example of using V1 notation https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#sample-request.

enter image description here

Neither notation worked. I am very new to APIs so I am sure I am missing something, but I am unsure what it is.


Solution

  • As you can see in the example, you can pass the dateRange values as single params in query string as follow:

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

    EDIT: Take care of use the camelCase version of the params name, in detail for dateRange: replace daterange with dateRange in all the occurrences and retry (I've replicated the error using the version in lowercase)

    Hope this help