n8n/packages/nodes-base/credentials/YouTubeOAuth2Api.credentials.ts

31 lines
788 B
TypeScript
Raw Normal View History

2020-07-01 19:54:51 -07:00
import {
ICredentialType,
INodeProperties,
2020-07-01 19:54:51 -07:00
} 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',
];
displayName = 'YouTube OAuth2 API';
documentationUrl = 'google';
properties: INodeProperties[] = [
2020-07-01 19:54:51 -07:00
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
2020-07-01 19:54:51 -07:00
default: scopes.join(' '),
},
];
}