{"id":21406789,"url":"https://github.com/ringcentral/engage-digital-source-sdk-js","last_synced_at":"2025-03-16T17:17:27.226Z","repository":{"id":55140248,"uuid":"216689091","full_name":"ringcentral/engage-digital-source-sdk-js","owner":"ringcentral","description":"Framework(js) to create Dimelo SDK source for RingCentral Engage Digital","archived":false,"fork":false,"pushed_at":"2021-05-07T12:17:38.000Z","size":62,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-23T04:11:35.354Z","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/ringcentral.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":"2019-10-22T00:21:54.000Z","updated_at":"2024-06-20T16:40:48.000Z","dependencies_parsed_at":"2022-08-14T13:10:54.646Z","dependency_job_id":null,"html_url":"https://github.com/ringcentral/engage-digital-source-sdk-js","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/ringcentral%2Fengage-digital-source-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fengage-digital-source-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fengage-digital-source-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fengage-digital-source-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringcentral","download_url":"https://codeload.github.com/ringcentral/engage-digital-source-sdk-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902321,"owners_count":20366262,"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-22T16:42:40.880Z","updated_at":"2025-03-16T17:17:27.186Z","avatar_url":"https://github.com/ringcentral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Engage Digital JavaScript Source SDK\n\n[![Build Status](https://travis-ci.com/ringcentral/engage-digital-source-sdk-js.svg?branch=release)](https://travis-ci.com/ringcentral/engage-digital-source-sdk-js)\n\nFramework to create `Engage Digital channel SDK` channel for RingCentral Engage Digital. [Wiki about RingCentral Engage Digital channel SDK channel](https://github.com/ringcentral/engage-digital-source-sdk/wiki)\n\n## Prerequisites\n\n- Nodejs 8.10+/npm, recommend using [nvm](https://github.com/creationix/nvm) to install nodejs/npm.\n- RingCentral Engage(Dimelo) account, [request a demo](https://www.ringcentral.com/digital-customer-engagement.html).\n\n## Quick start\n\nLet's start a simple RingCentral Engage source server .\n\n```bash\n# get the code\ngit clone git@github.com:ringcentral/engage-digital-source-sdk-js.git\ncd engage-digital-source-sdk-js\n\n# install dependecies\nnpm i\n\n# start proxy server, this will make your local bot server can be accessed by RingCentral service\nnpm run ngrok\n\n# will show\nForwarding                    https://xxxx.ap.ngrok.io -\u003e localhost:6066\n# Remember the https://xxxx.ap.ngrok.io, we will use it later\n```\n\nFollow [Step by step guide to create Dimelo SDK source in Admin console](docs/enable-sdk-source.md) to prepare the source.\n\n```bash\n# create env file\ncp .env.sample .env\n# then edit .env, set proper setting according to the tip in .env\n\n# run local dev server\nnpm start\n```\n\n### Test source server\n\nSave your source, your server will get request, you check the request log from console.\n\n## Use it as CLI tool\n\n```bash\nnpx ringcentral-engage-source path-to-your-source-server-config.js\n```\n\n## Use is as a module\n\n[docs/direct-use.md](docs/direct-use.md)\n\n## Post message to channel\n\nYou can get channel realtime url and api token from channel setting page, post new message to the channel.\n\n```js\nimport { postMessage } from 'ringcentral-engage-source'\n\nconst endpoint = CHANNEL_REALTIME_ENDPOINT\nconst secret = CHENNEL_API_TOKEN\n\nfunction createMsg () {\n  const msg = {\n    action: 'messages.create',\n    params: {\n      actions: ['show', 'reply'],\n      id: '222',\n      body: 'hi there~',\n      thread_id: '34232',\n      author: {\n        id: 'uuuu',\n        firstname: 'John',\n        lastname: 'Doe',\n        screenname: 'John Doe',\n        created_at: new Date()\n      }\n    }\n  }\n  const result = await postMessage(msg, endpoint, secret)\n  console.log(result.data)\n}\n```\n\n## Real example\n\n- Glip SDK source app: [https://github.com/ringcentral/engage-digital-sdk-source-glip](https://github.com/ringcentral/engage-digital-sdk-source-glip)\n- Reddit SDK source app: [https://github.com/ringcentral/engage-digital-sdk-source-reddit](https://github.com/ringcentral/engage-digital-sdk-source-reddit)\n\n## Write a config\n\n[docs/write-a-config.md](docs/write-a-config.md)\n\n## Build and Deploy to AWS Lambda\n\n[docs/deploy-to-lambda.md](docs/deploy-to-lambda.md)\n\n## Init a source server project with factory CLI tool\n\nWe have built-in CLI command to init a empty project from template: [https://github.com/ringcentral/engage-digital-source-server-template-js](https://github.com/ringcentral/engage-digital-source-server-template-js).\n\n```bash\nnpm i -g ringcentral-engage-source\nringcentral-engage-source-create my-app\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fengage-digital-source-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringcentral%2Fengage-digital-source-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fengage-digital-source-sdk-js/lists"}