caronc/apprise

Allow Twilio API keys instead of Account SIDs

richiechauhan opened this issue · 1 comments

💡 The Idea
The code currently expects Twilio Account SID. Twilio now allows API keys. This would be safer to setup and manage.

The code in apprise/plugins/twilio.py is

    template_tokens = dict(NotifyBase.template_tokens, **{
        'account_sid': {
            'name': _('Account SID'),
            'type': 'string',
            'private': True,
            'required': True,
            'regex': (r'^AC[a-f0-9]+$', 'i'),
        },

Where regex is looking for ^AC. The format for the Twilio API key seems to be starting with SK.

On further review it seems the Account SID still has to be used. You can use the API Keys as a substitute from the main Auth Token.