Search code examples
linkedin-api

A successful Post create via LinkedIn API cannot be read back


I have a very simple cycle, I make a Post to a user's feed via the Share API and then I attempt to read back that post.

Step 1: Share (using the Share API)

Send a POST request to the sharing endpoint: /v1/people/~/shares.

POST succeeds and I get a return value like the following.

<update>
  <update-key>UPDATE-1234-6789-SHARE</update-key>
  <update-url>https://www.linkedin.com/updates?discuss=&amp;scope=8219502&amp;stype=M&amp;topic=5705061301949063168&amp;type=U&amp;a=aovi</update-url>
</update>

Step 2: Read back (using the Network Updates API)

Try to read the post specifically: /v1/people/~/network/updates/key=UPDATE-1234-6789-SHARE.

The return value I get is something like this:

{
  "errorCode": 0,
  "message": "The update mapping to user's update-key cannot be processed.",
  "requestId": "0268X9ZRL7",
  "status": 400,
  "timestamp": 1418425769754
}

Timing is important. Running the same query 20 minutes later generally works as expected.

I have also tried just looking at the User's whole Feed /v1/people/~/network/updates?scope=self. In that case, the entry I seek is just missing.

  • Is this a known LinkedIn issue? (ticket #?)
  • If so, what type of delay does LinkedIn promise/expect?

Solution

  • Assuming that you're making the second API call to fetch the update with the same access token as the first API call, there shouldn't be more than a few seconds of delay expected. The POST call to create a new share asynchronously generates an Update-Key for you while the share gets processed in our system, but as I said it's within 1-3 seconds. I just tried these calls in sequence with a test share and was able to fetch the update as soon as I posted it. Is this a behavior you're consistently seeing?