Page MenuHomeSealhub

PhabricatorApi.credentials.ts
No OneTemporary

PhabricatorApi.credentials.ts

import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class PhabricatorApi implements ICredentialType {
name = 'phabricatorApi';
displayName = 'Phabricator API';
documentationUrl = 'https://hub.sealcode.org/conduit/';
properties: INodeProperties[] = [
{
displayName: 'Token',
name: 'token',
type: 'string',
default: '',
},
{
displayName: 'Domain',
name: 'domain',
type: 'string',
default: 'https://hub.sealcode.org',
},
];
// This allows the credential to be used by other parts of n8n
// stating how this credential is injected as part of the request
// An example is the Http Request node that can make generic calls
// reusing this credential
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: {
'api.token': '={{$credentials.token}}',
},
},
};
// The block below tells how this credential can be tested
test: ICredentialTestRequest = {
request: {
method: 'POST',
baseURL: '={{$credentials?.domain}}',
url: '/api/user.whoami',
},
};
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 8, 06:30 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034146
Default Alt Text
PhabricatorApi.credentials.ts (1 KB)

Event Timeline