{"id":21406646,"url":"https://github.com/ringcentral/ringcentral-ruby","last_synced_at":"2025-10-08T05:11:22.824Z","repository":{"id":44749658,"uuid":"114984556","full_name":"ringcentral/ringcentral-ruby","owner":"ringcentral","description":"Ruby SDK for RingCentral","archived":false,"fork":false,"pushed_at":"2025-04-16T18:23:13.000Z","size":788,"stargazers_count":9,"open_issues_count":2,"forks_count":20,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-01T05:53:48.067Z","etag":null,"topics":["ringcentral","ruby","sdk"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rkischuk/ringcentral-ruby","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.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-21T08:55:37.000Z","updated_at":"2025-06-09T14:05:46.000Z","dependencies_parsed_at":"2023-12-11T18:46:26.580Z","dependency_job_id":"97952a1d-bf4a-4ceb-81c7-e66e16eed298","html_url":"https://github.com/ringcentral/ringcentral-ruby","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ringcentral/ringcentral-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringcentral","download_url":"https://codeload.github.com/ringcentral/ringcentral-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891750,"owners_count":26063855,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ringcentral","ruby","sdk"],"created_at":"2024-11-22T16:41:12.147Z","updated_at":"2025-10-08T05:11:22.798Z","avatar_url":"https://github.com/ringcentral.png","language":"Ruby","readme":"# Official RingCentral SDK for Ruby\n\n[![Reference](https://img.shields.io/badge/rubydoc-reference-blue?logo=ruby)](https://ringcentral.github.io/ringcentral-ruby/)\n[![Twitter](https://img.shields.io/twitter/follow/ringcentraldevs.svg?style=social\u0026label=follow)](https://twitter.com/RingCentralDevs)\n\n**[RingCentral Developers](https://developer.ringcentral.com/api-products)** is\na cloud communications platform which can be accessed via more than 70 APIs. The\nplatform's main capabilities include technologies that enable:\n**[Voice](https://developer.ringcentral.com/api-products/voice),\n[SMS/MMS](https://developer.ringcentral.com/api-products/sms),\n[Fax](https://developer.ringcentral.com/api-products/fax),\n[Glip Team Messaging](https://developer.ringcentral.com/api-products/team-messaging),\n[Data and Configurations](https://developer.ringcentral.com/api-products/configuration)**.\n\n## Additional resources\n\n- [RingCentral API Reference](https://developer.ringcentral.com/api-docs/latest/index.html) -\n  an interactive reference for the RingCentral API that allows developers to\n  make API calls with no code.\n- [Document](https://ringcentral.github.io/ringcentral-ruby/) - an interactive\n  reference for the SDK code documentation.\n\n## Getting help and support\n\nIf you are having difficulty using this SDK, or working with the RingCentral\nAPI, please visit our\n[developer community forums](https://community.ringcentral.com/spaces/144/) for\nhelp and to get quick answers to your questions. If you wish to contact the\nRingCentral Developer Support team directly, please\n[submit a help ticket](https://developers.ringcentral.com/support/create-case)\nfrom our developer website.\n\n## Official VS. Community maintained SDKs\n\nThis is the **official** RingCentral SDK for the Ruby programming language.\nWhile there are other Ruby SDKs for RingCentral, those are maintained by the\ncommunity. We’re including this clarification to help avoid confusion, as some\nSDKs have similar names. That said, we truly appreciate and welcome community\ncontributions and alternative SDKs.\n\n## Installation\n\n```\ngem install ringcentral-sdk\n```\n\nIf for some reason `eventmachine` failed to install, please check\n[this](https://stackoverflow.com/a/31516586/862862).\n\nPlease note that, there is a gem with a similar name \"ringcentral_sdk\" which is\nnot maintained by us. Please make sure that you install the correct gem.\n\n### Name collision with `ringcentral` gem\n\nThe `ringcentral` gem is using RingCentral's legacy API which was End-of-Lifed\nin 2018. Everyone is recommended to move to the REST API.\n\nIf you have both the `ringcentral` and `ringcentral-sdk` gems installed, you\nwill run into a collision error when attempting to initialize the\n`ringcentral-sdk` RingCentral SDK.\n\nThe solution is `gem uninstall ringcentral`\n\n## Documentation\n\nhttps://developer.ringcentral.com/api-docs/latest/index.html\n\n## Usage\n\n```ruby\nrequire 'ringcentral'\n\nrc = RingCentral.new('clientID', 'clientSecret', 'serverURL')\nrc.authorize(jwt: 'jwt-token')\n\n# get\nr = rc.get('/restapi/v1.0/account/~/extension/~')\nexpect(r).not_to be_nil\nexpect('101').to eq(r.body['extensionNumber'])\n```\n\n## Samples\n\nFor more code samples, please refer to the test cases in `spec` folder.\n\n## How to specify query parameters\n\n### for get \u0026 delete\n\n```ruby\nrc.get('/restapi/v1.0/account/~/extension', { hello: 'world' })\n```\n\n### for post, put \u0026 patch\n\n```ruby\nrc.post('/restapi/v1.0/account/~/extension/~/sms', payload: body, params: { hello: 'world' })\n```\n\n### multi-value query parameter\n\n```ruby\nrc.get('/restapi/v1.0/account/~/extension', { hello: ['world1', 'world2'] })\n```\n\nAbove will be translated to\n`/restapi/v1.0/account/~/extension?hello=world1\u0026hello=world2`.\n\n### Token Refresh\n\nAccess token expires. You need to call `rc.refresh()` before it expires. If you\nwant the SDK to do auto refresh please `rc.auto_refresh = true` before\nauthorization.\n\n### Load pre-existing token\n\nLet's say you already have a token. Then you can load it like this:\n`rc.token = your_token_object`. The benefit of loading a preexisting token is\nyou don't need to go through any authorization flow.\n\nIf what you have is a JSON string instead of a Ruby object, you need to convert\nit first: `JSON.parse(your_token_string)`.\n\nIf you only have a string for the access token instead of for the whole object,\nyou can set it like this:\n\n```ruby\nrc.token = { access_token: 'the token string' }\n```\n\n### Send SMS\n\n```ruby\nr = rc.post('/restapi/v1.0/account/~/extension/~/sms', payload: {\n    to: [{phoneNumber: ENV['RINGCENTRAL_RECEIVER']}],\n    from: {phoneNumber: ENV['RINGCENTRAL_SENDER']},\n    text: 'Hello world'\n})\n```\n\n### Send fax\n\n```ruby\nrc.post('/restapi/v1.0/account/~/extension/~/fax',\npayload: { to: [{ phoneNumber: ENV['RINGCENTRAL_RECEIVER'] }] },\n    files: [\n        ['spec/test.txt', 'text/plain'],\n        ['spec/test.png', 'image/png']\n    ]\n)\n```\n\n### Send MMS\n\n```ruby\nr = rc.post('/restapi/v1.0/account/~/extension/~/sms',\n    payload: {\n        to: [{ phoneNumber: ENV['RINGCENTRAL_RECEIVER'] }],\n        from: { phoneNumber: ENV['RINGCENTRAL_SENDER'] },\n        text: 'hello world'\n    },\n    files: [\n        ['spec/test.png', 'image/png']\n    ]\n)\n```\n\n## Subscriptions\n\n### WebSocket Subscriptions\n\n```ruby\nevents = [\n  '/restapi/v1.0/account/~/extension/~/message-store',\n]\nsubscription = WS.new(rc, events, lambda { |message|\n  puts message\n})\nsubscription.subscribe()\n```\n\n#### How to keep a subscription running 24 * 7?\n\nThere are two main cases that a subscription will be terminated:\n\n- Absolute time out. The maximum time for a subscription to run is 24 hours.\n  After that, the websocket connection will be closed by the server.\n- Network issue. It could be your local network issue or the server's network\n  issue. In either case, your websocket connection will be closed\n\nIn order to keep a subscription running 24 * 7, you need to re-subscribe when\nthe connection is closed.\n\n```ruby\nsubscription.on_ws_closed = lambda { |event|\n  # make sure that there is no network issue and re-subscribe\n  subscription.subscribe()\n}\n```\n\n## How to test\n\n```\nbundle install\n```\n\nRename `.env.sample` to `.env`.\n\nEdit `.env` file to specify credentials.\n\n`RINGCENTRAL_RECEIVER` is a phone number to receive SMS, Fax..etc.\n\nRun `bundle exec rspec`\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringcentral%2Fringcentral-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-ruby/lists"}