客户需要一个帐户SID

时间:2019-01-31 01:20:44

标签: node-red

有没有一种方法可以编辑Twilio节点模块的config.json文件,以便它为sms-twilio节点显式设置Account SID和Auth Token。我可以通过编辑flow.json文件来实现吗?

按照twilio模块README.MD文件的指示,我尝试编辑twilio节点的config.json以合并我的帐户SID和Auth令牌,但是当我运行node-red时,我仍然得到相同的“客户端需要明确设置一个帐户SID和验证令牌”。

moxa@Moxa:~/.node-red$
moxa@Moxa:~/.node-red$ node-red
31 Jan 17:00:54 - [info]

Welcome to Node-RED
===================

31 Jan 17:00:54 - [info] Node-RED version: v0.19.5
31 Jan 17:00:54 - [info] Node.js  version: v6.14.0
31 Jan 17:00:54 - [info] Linux 4.1.0-ltsi-rt-uc8100-me+ arm LE
31 Jan 17:01:00 - [info] Loading palette nodes
31 Jan 17:01:07 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
31 Jan 17:01:07 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
31 Jan 17:01:34 - [info] Settings file  : /home/moxa/.node-red/settings.js
31 Jan 17:01:34 - [info] Context store  : 'default' [module=memory]
31 Jan 17:01:34 - [info] User directory : /home/moxa/.node-red
31 Jan 17:01:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
31 Jan 17:01:34 - [info] Flows file     : /home/moxa/.node-red/flows_Moxa.json
31 Jan 17:01:35 - [info] Server now running at http://127.0.0.1:1880/
31 Jan 17:01:35 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

31 Jan 17:01:35 - [info] Starting flows
31 Jan 17:01:35 - [error] [amazon config:fb6e3837.b0fad8] TypeError: Cannot read property 'accessKey' of undefined
31 Jan 17:01:35 - [error] [sms:4dcdccae.502fa4] Client requires an Account SID and Auth Token set explicitly or via the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables
31 Jan 17:01:35 - [error] [sms:cf027e1e.e853e] Client requires an Account SID and Auth Token set explicitly or via the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables
31 Jan 17:01:35 - [info] Started flows
31 Jan 17:01:45 - [info] [debug:Debugger]

Per Tank Level: 60%
Raw Tank Level: 19916
31 Jan 17:01:45 - [info] [debug:Debugger]

这是config.json文件,应该提供所需的SID和Auth令牌。

//Configuration for running tests and examples against the Twilio API
module.exports = {
    accountSid:'**************************', // Actual Json isnt "*"'s
    authToken:'***************************',
    from:'*********', //The Twilio number you've bought or configured
    to:'************' //The number you would like to send messages to for testing
};

0 个答案:

没有答案