{"id":20593350,"url":"https://github.com/objectisadvantag/sparkbot-starterkit","last_synced_at":"2026-06-04T17:31:46.110Z","repository":{"id":57366929,"uuid":"55883801","full_name":"ObjectIsAdvantag/sparkbot-starterkit","owner":"ObjectIsAdvantag","description":"Starter Kit to hack a CiscoSpark bot (NodeJS, Express)","archived":false,"fork":false,"pushed_at":"2016-10-20T21:52:32.000Z","size":1121,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-19T07:36:11.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ObjectIsAdvantag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-10T06:15:14.000Z","updated_at":"2022-02-22T06:40:24.000Z","dependencies_parsed_at":"2022-08-23T19:40:33.051Z","dependency_job_id":null,"html_url":"https://github.com/ObjectIsAdvantag/sparkbot-starterkit","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsparkbot-starterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsparkbot-starterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsparkbot-starterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObjectIsAdvantag%2Fsparkbot-starterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ObjectIsAdvantag","download_url":"https://codeload.github.com/ObjectIsAdvantag/sparkbot-starterkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242225568,"owners_count":20092599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T07:48:07.450Z","updated_at":"2025-03-06T14:25:48.557Z","avatar_url":"https://github.com/ObjectIsAdvantag.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-outgoing-webhooks\n\nA starter kit to build Spark Bots out of the Outgoing WebHook feature of the Cisco Spark Web Client.  \n\n**Note that this kit leverages Outgoing Webhooks exposed by the Spark Web Client, which is not the traditionnal way to build a Spark bots.\nBefore spending too much thime here, make sure you have checked these nodejs Bot libraries that leverages the traditionnal Spark API Webhooks: [flint](https://github.com/nmarus/flint), [node-sparkbot](https://github.com/CiscoDevNet/node-sparkbot)**\n\nNew to Cisco Spark ?\n- Spark is Cisco's Cloud Collaboration Services, which unifies team collaboration for the enterprise,\n- start with the [Web Client](https://web.ciscospark.com/) (signup, enjoy the free chat service, with end to end securiy and integrated video).\n\n\n## A bit of history \n\nThis effort was started after [@CiscoDevNet SmartCity Paris](https://twitter.com/hashtag/devnethackathon) and @TADHack London hackathons, to bootstrap NodeJS Spark developers in minutes.\n\nTherefore, the library is limited to very few dependencies and goal to keep them at a minimum (Express that's it).\n\nUntil July 2016, the library made it possible to support both traditional Webhooks and Outgoing integrations with the same programming interface.\n\nWith the introduction of the enhanced Spark Webhooks, this flexibility turned not to be sustainable. \n\n\n# Launch your bot in 60 seconds \n\nRead through the Quickstart hereafter, or jump to the [detailled guide](docs/BasicIntegrationSample.md)\n\n``` bash\n# In a 1st shell, install and launch your bot\n# if you are running OSX \n#\u003e sudo npm install express sparkbot-starterkit\n# On windows\n\u003e npm install node-outgoing-webhooks\n\u003e cd node-outgoing-webhooks\n\u003e node tests/no-config.js\nno configuration =\u003e starting up as an incoming integration...\nCisco Spark bot started on port: 8080\n\n# In a 2nd bash shell, check your bot is healthy by hitting your sparkbot health resource:\n# open in a web browser http://localhost:8080/ping/ \n# or use a back command such as curl, [httpie](https://github.com/jkbrzt/httpie), or [bat](https://github.com/astaxie/bat)\n# OSX devs: if localhost doesn't work for you, try 127.0.0.1\n\u003e curl http://localhost:8080/ping/\n{\"message\":\"Congrats, your bot is up and running\",\"since\":\"2016-07-06T23:20:50.296Z\",\"integrationURI\":\"/integration\",\"webhookURI\":null}\n\n# Then expose your bot to the internet\n\u003e npm install -g localtunnel\n\u003e lt -s myawesomebot -p 8080\nyour url is: http://myawesomebot.localtunnel.me\n\n# In a 3nd bash shell, check everything is running ok by hitting your sparkbot health resource\n# open in a web browser https://myawesomebot.localtunnel.me/ping/ \n# or use a back command such as curl, [httpie](https://github.com/jkbrzt/httpie), or [bat](https://github.com/astaxie/bat)\n\u003e curl -v -X GET https://myawesomebot.localtunnel.me/ping\n* ...\n* NPN, negotiated HTTP1.1\n* ...\n* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384\n* ...\nHTTP/1.1 200 OK\n{\n    \"message\":\"Congrats, your bot is up and running\",\n    \"isWebhook\":false,\n    \"isIntegration\":true,\n    \"URI\":\"http://localhost:8080/integration\"\n}\n```\n\n# Then start sending Spark messages \u0026 commands to your bot\n\nFirst step is to create the Outgoing integration: \n- launch the [Web client](https://web.ciscospark.com),\n- pick a Room, look for the integrations pane on the right,\n- create a new integration of type \"Outgoing Webhook\" with a targetUrl pointing to your bot /integration URI, ex: https://myawesomebot.localtunnel.me/integration.\n\n_Note that an alternative would be to call the REST API Resource \"/webhooks/outgoing\" which is not documented though._\n\n\n# Troubleshooting\n\nFor debugging purpose, you may want to use a WebAPI Traffic inspector.\n\nIf you're looking for options, Windows users generally use [Fiddler](https://www.telerik.com/download/fiddler).\n\nLinux and Mac users may give a try to [smartproxy](https://github.com/ObjectIsAdvantag/smartproxy): an experimental #golang traffic capture tool.\n\n``` text\nhttps://sparkbot.localtunnel.me\n\u003c-internet-\u003e\nhttp://localhost:9090\n\u003c-lan-\u003e\n:8080\n```\n\nSimply [pick a binary](https://github.com/ObjectIsAdvantag/smartproxy/releases/tag/v0.4) for your platform, and run through these following steps.\n\n``` bash\n// download a Windows exe or Mac / Linux binary, set as executable, launch\n\u003e mv smartproxy.mac smartproxy\n\u003e chmod 755 smartproxy\n\u003e ./smartproxy --capture\n// by default smartproxy routes traffic from localhost:9090 to localhost:8080\n// the capture option let you to see incoming traffic\n\n// launch a tunnel to local port 9090\n\u003e lt -s sparkbot -p 9090\n// your bot is now exposed publically at https://sparkbot.localtunnel.me/\n\n// launch your bot, defaults to port 8080\n\u003e SPARK_TOKEN=XXXXXXXXXX node server.js\n\n// chat in the spark room\n\n// now examine traffic by opening http://localhost:9090/traffic with a web browser\n// select an HTTP request/response\n// look at the smartproxy console to get the request and response payloads\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectisadvantag%2Fsparkbot-starterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectisadvantag%2Fsparkbot-starterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectisadvantag%2Fsparkbot-starterkit/lists"}