mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
ef9d4aba90
Co-authored-by: Elias Meire <elias@meire.dev>
29 lines
581 B
TypeScript
29 lines
581 B
TypeScript
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
export class CodaApi implements ICredentialType {
|
|
name = 'codaApi';
|
|
|
|
displayName = 'Coda API';
|
|
|
|
documentationUrl = 'coda';
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Access Token',
|
|
name: 'accessToken',
|
|
type: 'string',
|
|
typeOptions: { password: true },
|
|
default: '',
|
|
},
|
|
];
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://coda.io/apis/v1/whoami',
|
|
headers: {
|
|
Authorization: '=Bearer {{$credentials.accessToken}}',
|
|
},
|
|
},
|
|
};
|
|
}
|