Integrations / LinkedIn
Professional network: identify the member and publish or delete text posts as that member.
3 actions
OAuth 2
1 read1 write1 destructive
Calls api.linkedin.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "linkedin" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
openid | Identify the connected LinkedIn member |
profile | Read your name and profile picture |
w_member_social | Create and delete posts on your behalf |
Actions
Create text postwritelinkedin.create_text_postPublish a text-only post on the connected member's LinkedIn feed. The new post id is returned by LinkedIn in the x-restli-id response header, not the body.
Needs scope: w_member_social
| Input | Type | Description | |
|---|---|---|---|
person_id | string | Required | Member id, the sub value from get_userinfo |
text | string | Required | Post text (commentary) |
visibility | string | Optional | Default PUBLIC |
await setu.execute({
userId: "user_1",
action: "linkedin.create_text_post",
input: {
"person_id": "<person_id>",
"text": "<text>"
},
});Delete postdestructivelinkedin.delete_postPermanently delete one of the connected member's posts by its URN (urn:li:share:... or urn:li:ugcPost:...).
Needs scope: w_member_social
| Input | Type | Description | |
|---|---|---|---|
post_urn | string | Required | Post URN, for example urn:li:share:6844785523593134080 |
await setu.execute({
userId: "user_1",
action: "linkedin.delete_post",
input: {
"post_urn": "<post_urn>"
},
confirm: true,
});Get my LinkedIn profilereadlinkedin.get_userinfoGet the connected member's id (sub), name and picture via Sign In with LinkedIn using OpenID Connect.
Needs scopes: openid, profile
No input.
await setu.execute({
userId: "user_1",
action: "linkedin.get_userinfo",
input: {},
});