n8n/packages/nodes-base/credentials/WebflowApi.credentials.ts
2026-02-06 10:01:18 +00:00

41 lines
719 B
TypeScript

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class WebflowApi implements ICredentialType {
name = 'webflowApi';
displayName = 'Webflow API';
documentationUrl = 'webflow';
properties: INodeProperties[] = [
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.webflow.com',
url: '/v2/sites',
},
};
}