mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
32 lines
651 B
TypeScript
32 lines
651 B
TypeScript
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
export class HubspotApi implements ICredentialType {
|
|
name = 'hubspotApi';
|
|
displayName = 'HubSpot API';
|
|
documentationUrl = 'hubspot';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
qs: {
|
|
hapikey: '={{$credentials.apiKey}}',
|
|
},
|
|
},
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://api.hubapi.com',
|
|
url: '/account-info/v3/details',
|
|
},
|
|
};
|
|
}
|