# Cisco Spark settings (https://github.com/tonybaloney/hubot-spark):
export HUBOT_ADAPTER=spark
export HUBOT_SPARK_API_URI="https://api.ciscospark.com/v1"
export HUBOT_SPARK_ACCESS_TOKEN="xxxxxx"
export HUBOT_SPARK_ROOMS="yyyyyyyy"
curl -X GET \
https://api.ciscospark.com/v1/rooms/yyyyyyyy \
-H 'Authorization: Bearer xxxxxx' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"name": "StackStorm test"
}'
{"id":"zzzzzzzVk","title":"StackStorm test","type":"group","isLocked":false,"lastActivity":"2018-01-29T17:49:27.237Z","creatorId":"tttttttttttt","created":"2018-01-29T09:19:35.544Z"}
[Mon Jan 29 2018 10:18:19 GMT+0000 (UTC)] DEBUG Loading adapter spark
[Mon Jan 29 2018 10:18:20 GMT+0000 (UTC)] INFO Trying connection to https://api.ciscospark.com/v1
one flight: attempted to invoke _getBinding while previous invocation still in flight
one flight: attempted to invoke _getBinding while previous invocation still in flight
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Connected as a bot? false
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] INFO Created connection instance to Spark
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Completed adding rooms to list
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Created bot, setting up listeners
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Done with custom bot logic
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/stackstorm/chatops/scripts
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/stackstorm/chatops/src/scripts
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] INFO Requesting a token...
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] WARNING No supported formatter found for spark. Using DefaultFormatter.
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Using spark post data handler.
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-stackstorm/scripts/stackstorm.js
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-help/src/help.coffee
[Mon Jan 29 2018 10:18:22 GMT+0000 (UTC)] ERROR Failed to authenticate: Invalid or missing credentials
(node:1085) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): [object Object]