{"id":16590660,"url":"https://github.com/pacdiv/embedded-slack","last_synced_at":"2025-10-10T02:02:35.494Z","repository":{"id":57222938,"uuid":"82895767","full_name":"pacdiv/embedded-slack","owner":"pacdiv","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-26T09:52:56.000Z","size":9,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T00:32:01.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pacdiv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T07:04:04.000Z","updated_at":"2023-07-01T15:13:39.000Z","dependencies_parsed_at":"2022-08-29T00:11:32.618Z","dependency_job_id":null,"html_url":"https://github.com/pacdiv/embedded-slack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacdiv%2Fembedded-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacdiv%2Fembedded-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacdiv%2Fembedded-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacdiv%2Fembedded-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pacdiv","download_url":"https://codeload.github.com/pacdiv/embedded-slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238803384,"owners_count":19533305,"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-10-11T23:13:55.103Z","updated_at":"2025-10-10T02:02:30.457Z","avatar_url":"https://github.com/pacdiv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embedded-slack\n\nembedded-slack allows you to add a Slack built-in chat on your website. This chat can be connected to your support team.\n\n\u003e **Note:** :warning:\n\u003e embedded-slack has been developed as a technical try to determine if Slack can be used from a web page, to allow customers to discuss with a support team. It currently works with a test token so, **at this time, using this package in production is not recommanded**.\n\n### Prerequisites\n\n----------\n\nFirst, you'll need to generate a [test token](https://api.slack.com/docs/oauth-test-tokens) for your Slack team. Then, you need'll to pick one channel ID from your Slack team. If you don't have any channel ID, feel free to copy/paste and run the following code to get one:\n\n```javascript\n// channels.js\nconst slack = require('slack')\nconst token = \"your_test_token\"\n\nslack.channels.list({ token }, (err, data) =\u003e {\n  if (err) {\n    console.error(err)\n    return\n  }\n  console.log(data)\n})\n```\n```bash\n$ npm install slack\n$ node channels.js\n```\n\n### Installation and setting up with webpack 2.x\n\n----------\n\nFirst, install embedded-slack and loaders using npm:\n```bash\n$ npm install --save embedded-slack\n$ npm install --save-dev node-sass style-loader css-loader sass-loader\n```\nThen, add the following loader (lines 3 to 6) to your webpack module loaders:\n```javascript\nmodule: {\n  loaders: [\n    {\n      test: /\\.scss$/,\n      loaders: [ 'style-loader', 'css-loader', 'sass-loader' ]\n    }\n  ]\n}\n```\n\n### Usage\n\n----------\n\nIn this example, we create an EmbeddedSlack object with the three mandatory properties:\n```javascript\n// index.js\nimport EmbeddedSlack from 'embedded-slack'\n\nconst chat = new EmbeddedSlack({\n  containerId: 'embedded-slack',\n  channel: 'your_channel_id',\n  token: 'your_token'\n})\n```\n```html\n\u003c!-- index.html --\u003e\n\u003cbody\u003e\n  \u003cdiv id=\"embedded-slack\" /\u003e\n\u003c/body\u003e\n```\n\nBy including those lines to your code, if prerequisites and installation are setted, a blue div will appear at the bottom right of your webpage. When you will write a message in this channel from your favorite Slack client, this message will appear in the chat you've just setted; feel free to respond ! :slightly_smiling_face:\n\n### Built With\n\n----------\n\n[Slack](https://github.com/smallwins/slack) - Slack Web and RTM API client for Node and the Browser\n\n### License\n\n----------\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacdiv%2Fembedded-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacdiv%2Fembedded-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacdiv%2Fembedded-slack/lists"}