2023-01-27 03:22:44 -08:00
import type { ICredentialType , INodeProperties } from 'n8n-workflow' ;
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
export class LinkedInOAuth2Api implements ICredentialType {
name = 'linkedInOAuth2Api' ;
2022-12-02 12:54:28 -08:00
2022-07-24 08:36:17 -07:00
extends = [ 'oAuth2Api' ] ;
2022-12-02 12:54:28 -08:00
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
displayName = 'LinkedIn OAuth2 API' ;
2022-12-02 12:54:28 -08:00
2020-09-21 02:11:02 -07:00
documentationUrl = 'linkedIn' ;
2022-12-02 12:54:28 -08:00
2021-06-12 09:39:55 -07:00
properties : INodeProperties [ ] = [
2022-06-13 22:27:19 -07:00
{
displayName : 'Grant Type' ,
name : 'grantType' ,
type : 'hidden' ,
default : 'authorizationCode' ,
} ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
{
displayName : 'Organization Support' ,
name : 'organizationSupport' ,
2021-06-12 09:39:55 -07:00
type : 'boolean' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
default : true ,
2022-04-13 23:32:27 -07:00
description : 'Whether to request permissions to post as an organization' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
} ,
{
displayName : 'Authorization URL' ,
name : 'authUrl' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
default : 'https://www.linkedin.com/oauth/v2/authorization' ,
required : true ,
} ,
{
displayName : 'Access Token URL' ,
name : 'accessTokenUrl' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
default : 'https://www.linkedin.com/oauth/v2/accessToken' ,
required : true ,
} ,
{
displayName : 'Scope' ,
name : 'scope' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2022-07-24 08:36:17 -07:00
default :
2023-06-13 07:44:35 -07:00
'=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":",r_liteprofile,r_emailaddress"}}' ,
2022-07-24 08:36:17 -07:00
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>.' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
} ,
{
displayName : 'Auth URI Query Parameters' ,
name : 'authQueryParameters' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
default : '' ,
} ,
{
displayName : 'Authentication' ,
name : 'authentication' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
:sparkles: Add LinkedIn Integration (#942)
* :construction: node logic, request logic, authentication, logo, descriptions
* :construction: Posting image, article and text finished.
* :construction: Posting image, article and text in post finished
* :zap: Post creation (image, articles, text)
* :zap: Added post creation by organization, fixed up descriptions, credentials, indentation
* :zap: Fix issues on LinkedIn-Node
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
2020-09-17 14:32:12 -07:00
default : 'body' ,
} ,
] ;
}