Add API key to Twilio credentials (#1797)

*  Add API key to Twilio credentials

*  Minor simplification

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Iván Ovejero
2021-05-19 02:05:49 +02:00
committed by GitHub
parent 6e8de269ec
commit 0fdae7fec3
2 changed files with 77 additions and 6 deletions

View File

@@ -9,6 +9,22 @@ export class TwilioApi implements ICredentialType {
displayName = 'Twilio API';
documentationUrl = 'twilio';
properties = [
{
displayName: 'Auth Type',
name: 'authType',
type: 'options' as NodePropertyTypes,
default: 'authToken',
options: [
{
name: 'Auth Token',
value: 'authToken',
},
{
name: 'API Key',
value: 'apiKey',
},
],
},
{
displayName: 'Account SID',
name: 'accountSid',
@@ -20,6 +36,42 @@ export class TwilioApi implements ICredentialType {
name: 'authToken',
type: 'string' as NodePropertyTypes,
default: '',
displayOptions: {
show: {
authType: [
'authToken',
],
},
},
},
{
displayName: 'API Key SID',
name: 'apiKeySid',
type: 'string' as NodePropertyTypes,
default: '',
displayOptions: {
show: {
authType: [
'apiKey',
],
},
},
},
{
displayName: 'API Key Secret',
name: 'apiKeySecret',
type: 'string' as NodePropertyTypes,
typeOptions: {
password: true,
},
default: '',
displayOptions: {
show: {
authType: [
'apiKey',
],
},
},
},
];
}