0

LinkedIN V2 Api - Time & Props

Hi Everyone,

I can't find how to use user input control variables in my linkedin V2 api query.

I need this to set a timeframe (ex. collect all the linkedin posts between {props.startdate1} & {props.enddate1}. I tried several options (such as next example): 

https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List({hash.append("urn:li:organization:27237").encodeURL().printDigest();}) &timeIntervals.timeRange.start={props.StartDatum1}&timeIntervals.timeRange.end={props.EindDatum1}

 

However, this doesn't seem to work and I can't find any documentation on this. 

 

Thank you in advance, 

1 comment

  • 0
    Avatar
    Janice Janczyn

    Hi Jasmien, 

    Are you able to get the query to work using hard-coded values instead of variables?  This is a good first step in debugging API queries. From the LinkedIn API documentation, the timeIntervals.timeRange.start and timeIntervals.timeRange.end parameters require Unix format date/time values in milliseconds, for example:

         &timeIntervals.timeRange.start=1451606400000&timeIntervals.timeRange.end=1452211200000

    This means your StartDatum1 and EindDatum1 variables must either be in Unix milliseconds, that is

          StartDatum1 = 1451606400000
          EindDatum1 = 1452211200000
          &timeIntervals.timeRange.start={props.StartDatum1}&timeIntervals.timeRange.end={props.EindDatum1}

    or if you prefer that they be set to Unix seconds, you can append 000 to your variables

         StartDatum1 = 1451606400
         EindDatum1 = 1452211200
         &timeIntervals.timeRange.start={props.StartDatum1}000&timeIntervals.timeRange.end={props.EindDatum1}000

     

    Thank you,
                 Janice

Please sign in to leave a comment.