S_412_PRECONDITION_FAILED=Invalid arguments while sharing on company page
Asked Answered
L

2

15

Today, I noticed that all my API calls making shares to LinkedIn company pages return the following error:

Invalid arguments: {S_412_PRECONDITION_FAILED=Invalid arguments}

I'm using XML format. I tried to make the same share but to LinkedIn accounts and it works very well.

Here is my xml request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<share>
    <comment>Comment</comment>
    <content>
        <title>title</title>
        <description>description</description>
        <submitted-url>URL</submitted-url>
        <submitted-image-url>IMAGE_URL</submitted-image-url>
    </content>
    <visibility>
        <code>anyone</code>
    </visibility>
</share>

Has there been a breaking change in the LinkedIn API?

Latisha answered 28/9, 2017 at 10:34 Comment(6)
Did you get the auth token with OAuth 1 or 2?Zeiler
I had exactly the same problem yesterday. Implemented oauth2 and the problem is solved.Annabelleannabergite
we're having the same problem here using v1, v2 works fineScammon
@MichielvanBallegooijen how you implemented oauth 2?Iridectomy
@yhon-a Have you read any public information that oauth v1 no longer is supported?Flatt
I didn't find any information about OAuth 1 support. Now, I implemented my API calls through Oauth 2 and everything works fine. Hope Linkedin will not change other things :(. Thanks everybody.Latisha
S
4

Seems LinkedIn has killed oAuth 1.x tokens for /company operations.

Implemented oAuth 2 and things are working fine.

Did not find a public announcement of this change, but typical of LinkedIn to suck when it comes to their public API.

Syncopated answered 29/9, 2017 at 16:43 Comment(2)
+1 for the answer, wishing I could +100 for LinkedIn's terrible API support. They don't even have a mechanism for reporting non-security related bugs!Sodomite
It's just unbelievable and unacceptable for such a big company.Diptych
A
1

Follow LinkedIns manual to implement oauth 2.0. Then everything works fine. https://developer.linkedin.com/docs/oauth2

Annabelleannabergite answered 2/10, 2017 at 7:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.