2020-07-01 19:54:51 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
|
|
|
NodePropertyTypes,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
//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';
|
|
|
|
extends = [
|
|
|
|
'googleOAuth2Api',
|
|
|
|
];
|
2020-08-19 00:59:19 -07:00
|
|
|
displayName = 'YouTube OAuth2 API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'google';
|
2020-07-01 19:54:51 -07:00
|
|
|
properties = [
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
|
|
|
type: 'hidden' as NodePropertyTypes,
|
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|