import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
linkedin: {
type: "app",
app: "linkedin",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.linkedin.com/v2/me`,
headers: {
Authorization: `Bearer ${this.linkedin.$auth.oauth_access_token}`,
},
})
},
})
Create post on LinkedIn using text, URL or article. See the docs for more information
Create post on LinkedIn using text, URL or article. See the docs for more information
Create a comment on a share or user generated content post. See the docs here
Create an image post on LinkedIn. See the docs here
LinkedIn uses OAuth authentication. When you connect your LinkedIn account, Pipedream will open a popup window where you can sign into LinkedIn and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any LinkedIn API.
Pipedream requests the following authorization scopes when you connect your account:
r_1st_connections_size
r_ads_reporting
rw_organization_admin
w_organization_social
r_organization_social
w_member_social_feed
w_member_social
w_organization_social_feed
r_basicprofile
rw_ads
r_organization_social_feed
r_ads
GET
https://www.linkedin.com/oauth/v2/authorization
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://www.linkedin.com/oauth/v2/accessToken
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://www.linkedin.com/oauth/v2/accessToken
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
redirect_uri={{oauth.redirect_uri}}
&
refresh_token={{oauth.refresh_token}}