{"id":13407123,"url":"https://github.com/tylerlong/hubot-ringcentral","last_synced_at":"2025-04-13T19:32:43.617Z","repository":{"id":42109061,"uuid":"66853853","full_name":"tylerlong/hubot-ringcentral","owner":"tylerlong","description":"Hubot adapter to use with Glip","archived":false,"fork":false,"pushed_at":"2023-01-23T23:21:41.000Z","size":960,"stargazers_count":7,"open_issues_count":14,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-10T04:50:55.543Z","etag":null,"topics":["glip","hubot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tylerlong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-29T15:02:09.000Z","updated_at":"2021-05-25T01:09:09.000Z","dependencies_parsed_at":"2023-02-13T04:40:23.191Z","dependency_job_id":null,"html_url":"https://github.com/tylerlong/hubot-ringcentral","commit_stats":null,"previous_names":["tylerlong/hubot-glip"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fhubot-ringcentral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fhubot-ringcentral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fhubot-ringcentral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fhubot-ringcentral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylerlong","download_url":"https://codeload.github.com/tylerlong/hubot-ringcentral/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768101,"owners_count":21158585,"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":["glip","hubot"],"created_at":"2024-07-30T20:00:22.240Z","updated_at":"2025-04-13T19:32:43.588Z","avatar_url":"https://github.com/tylerlong.png","language":"JavaScript","funding_links":[],"categories":["Adapters"],"sub_categories":[],"readme":"# hubot-ringcentral (legacy: hubot-glip)\n\n[Hubot](https://hubot.github.com/) adapter to use with [RingCentral Team Messaging](https://app.ringcentral.com/).\n\n\n## Video tutorials\n\n- [How to createa a RingCentral private bot using Hubot](https://youtu.be/rEmd7SIDNe4)\n- [How to create a RingCentral public bot using Hubot](https://youtu.be/al-RoNSdfO8)\n\n\n## Create a new bot\n\nCreate new project with the following structure:\n\n```\nyour-bot/\n    scripts/\n    external-scripts.json\n```\n\nIn the root of your bot project, execute:\n\n```\nyarn add hubot@2.19.0 hubot-ringcentral \u0026\u0026 yarn add --dev babel-polyfill\n```\n\n\n## Add external scripts\n\nTake [hubot-help](https://www.npmjs.com/package/hubot-help) for example:\n\n```\nyarn add hubot-help\n```\n\nThen config it to `external-scripts.json`:\n\n```json\n[\n    \"hubot-help\"\n]\n```\n\n\n## Add custom scripts\n\nLet's assume that we want to add `ping` feature to the bot.\n\nCreate `scripts/ping.js` file with the following content:\n\n```js\n// Commands:\n//   hubot ping - ping the bot\nmodule.exports = robot =\u003e {\n  robot.respond(/ping$/, res =\u003e {\n    res.send('pong')\n  })\n}\n```\n\n\n## Get RingCentral access_token\n\nThis step is different for provate bot and public bot.\n\n### Private bot\n\nIf you bot is a private bot, you can simply use the default OAuth Redirect URI: `https://www.ringcentral.com`.\nAnd you can get the token from GUI of https://developer.ringcentral.com.\nCreate `token.json` in the root of your bot project with the following content:\n\n```json\n{\n    \"access_token\": \"the-access-token-string\"\n}\n```\n\n### Public bot\n\nIf you bot is a public bot, You need to set the OAuth Redirect URI to `${RINGCENTRAL_BOT_SERVER}/oauth`.\n\nFor example, if your bot is running on local with ngrok uri `https://xxxxx.ngrok.io`, you should set the OAuth Redirect URI to `https://xxxxx.ngrok.io/oauth`.\n\nWhen you successfully add the bot to RingCentral Team Messaging, a `token.json` file will be created for you automatically.\n\n\n## Run your bot\n\n```\nRINGCENTRAL_SERVER=https://platform.devtest.ringcentral.com \\\nRINGCENTRAL_CLIENT_ID=clientId \\\nRINGCENTRAL_CLIENT_SECRET=clientSecret \\\nRINGCENTRAL_BOT_SERVER=https://the-bot-server \\\nnpx hubot -a ringcentral -n x\n```\n\n- `RINGCENTRAL_SERVER` - This is the RingCentral API server. Optional. By default it's `https://platform.ringcentral.com`. Use `https://platform.devtest.ringcentral.com` for sandbox\n- `RINGCENTRAL_BOT_SERVER` - **Optional**. The server that your bot is running on. If you use ngork for development, the uri should be `https://xxxxx.ngrok.io`. It is **only required** for public bot and when you do not have a RingCentral access token. Ignore this environment variable if your bot is a private bot or if you already have a RingCentral access token.\n- `-n x` means the name of your bot is `x`. You can use any name\n\n\n## Test your bot\n\nFor production login https://app.ringcentral.com, for sandbox login https://app.devtest.ringcentral.com/\n\nFind your bot in RingCentral and talk to it:\n\n\n```\nSend: x ping\nReceive: pong\nSend: x help\nReceive: xping - ping the bot\n```\n\nExample above assume that your bot's name is `x` and you have installed exernal script `hubot-help` and added custom script `ping`. For more details about them please read content above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlong%2Fhubot-ringcentral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerlong%2Fhubot-ringcentral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlong%2Fhubot-ringcentral/lists"}