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

28 lines
523 B
TypeScript
Raw Normal View History

import {
IAuthenticateGeneric,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class SendGridApi implements ICredentialType {
name = 'sendGridApi';
displayName = 'SendGrid API';
documentationUrl = 'sendgrid';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
default: '',
},
];
authenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
} as IAuthenticateGeneric;
}