2023-01-27 03:22:44 -08:00
|
|
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-07-01 19:54:51 -07:00
|
|
|
|
|
|
|
//https://developers.google.com/youtube/v3/guides/auth/client-side-web-apps#identify-access-scopes
|
|
|
|
const scopes = [
|
|
|
|
'https://www.googleapis.com/auth/youtube',
|
|
|
|
'https://www.googleapis.com/auth/youtubepartner',
|
|
|
|
'https://www.googleapis.com/auth/youtube.force-ssl',
|
|
|
|
'https://www.googleapis.com/auth/youtube.upload',
|
2020-08-09 14:39:28 -07:00
|
|
|
'https://www.googleapis.com/auth/youtubepartner-channel-audit',
|
2020-07-01 19:54:51 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
export class YouTubeOAuth2Api implements ICredentialType {
|
|
|
|
name = 'youTubeOAuth2Api';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-09-11 01:15:36 -07:00
|
|
|
icon = 'node:n8n-nodes-base.youTube';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['googleOAuth2Api'];
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-19 00:59:19 -07:00
|
|
|
displayName = 'YouTube OAuth2 API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'google';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-07-01 19:54:51 -07:00
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-01 19:54:51 -07:00
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|