mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(LinkedIn Node): Add support for Community Management API (#7451)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
const scopes = ['w_member_social', 'w_organization_social', 'r_basicprofile'];
|
||||
|
||||
export class LinkedInCommunityManagementOAuth2Api implements ICredentialType {
|
||||
name = 'linkedInCommunityManagementOAuth2Api';
|
||||
|
||||
extends = ['oAuth2Api'];
|
||||
|
||||
displayName = 'LinkedIn Community Management OAuth2 API';
|
||||
|
||||
documentationUrl = 'linkedIn';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Grant Type',
|
||||
name: 'grantType',
|
||||
type: 'hidden',
|
||||
default: 'authorizationCode',
|
||||
},
|
||||
{
|
||||
displayName: 'Authorization URL',
|
||||
name: 'authUrl',
|
||||
type: 'hidden',
|
||||
default: 'https://www.linkedin.com/oauth/v2/authorization',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Access Token URL',
|
||||
name: 'accessTokenUrl',
|
||||
type: 'hidden',
|
||||
default: 'https://www.linkedin.com/oauth/v2/accessToken',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Scope',
|
||||
name: 'scope',
|
||||
type: 'hidden',
|
||||
default: scopes.join(' '),
|
||||
},
|
||||
{
|
||||
displayName: 'Auth URI Query Parameters',
|
||||
name: 'authQueryParameters',
|
||||
type: 'hidden',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
type: 'hidden',
|
||||
default: 'body',
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export class LinkedInOAuth2Api implements ICredentialType {
|
||||
name: 'scope',
|
||||
type: 'hidden',
|
||||
default:
|
||||
'=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":",r_liteprofile,r_emailaddress"}}',
|
||||
'=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social": $self["legacy"] === true ? ",r_liteprofile,r_emailaddress" : ",profile,email,openid"}}',
|
||||
description:
|
||||
'Standard scopes for posting on behalf of a user or organization. See <a href="https://docs.microsoft.com/en-us/linkedin/marketing/getting-started#available-permissions"> this resource </a>.',
|
||||
},
|
||||
@@ -58,5 +58,12 @@ export class LinkedInOAuth2Api implements ICredentialType {
|
||||
type: 'hidden',
|
||||
default: 'body',
|
||||
},
|
||||
{
|
||||
displayName: 'Legacy',
|
||||
name: 'legacy',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Whether to use the legacy API',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user