2022-08-24 01:26:48 -07:00
|
|
|
import {
|
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
|
|
|
ICredentialType,
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
2021-01-02 11:16:18 -08:00
|
|
|
|
|
|
|
export class PhantombusterApi implements ICredentialType {
|
|
|
|
name = 'phantombusterApi';
|
|
|
|
displayName = 'Phantombuster API';
|
|
|
|
documentationUrl = 'phantombuster';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2021-01-02 11:16:18 -08:00
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-02 11:16:18 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-08-24 01:26:48 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'X-Phantombuster-Key': '={{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: 'https://api.phantombuster.com/api/v2',
|
|
|
|
url: '/agents/fetch-all',
|
|
|
|
},
|
|
|
|
};
|
2021-01-02 11:16:18 -08:00
|
|
|
}
|