{"id":18446439,"url":"https://github.com/ovh/node-ovh","last_synced_at":"2025-05-15T21:04:21.258Z","repository":{"id":21035068,"uuid":"24331583","full_name":"ovh/node-ovh","owner":"ovh","description":"Node.js wrapper for the OVH APIs","archived":false,"fork":false,"pushed_at":"2025-04-16T15:48:25.000Z","size":852,"stargazers_count":137,"open_issues_count":17,"forks_count":28,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-15T09:18:02.997Z","etag":null,"topics":["api-wrapper"],"latest_commit_sha":null,"homepage":"http://ovh.github.io/node-ovh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-09-22T14:20:22.000Z","updated_at":"2025-04-16T15:48:29.000Z","dependencies_parsed_at":"2024-06-18T13:53:00.805Z","dependency_job_id":"801b2bf9-bc76-4095-bb90-85a25c708830","html_url":"https://github.com/ovh/node-ovh","commit_stats":{"total_commits":81,"total_committers":14,"mean_commits":5.785714285714286,"dds":0.4814814814814815,"last_synced_commit":"f26f993b15e61ea2f05f5b016ced323af8af5e43"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fnode-ovh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fnode-ovh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fnode-ovh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovh%2Fnode-ovh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovh","download_url":"https://codeload.github.com/ovh/node-ovh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"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":["api-wrapper"],"created_at":"2024-11-06T07:09:18.930Z","updated_at":"2025-05-15T21:04:21.248Z","avatar_url":"https://github.com/ovh.png","language":"JavaScript","readme":"[![Node.js Wrapper for OVHcloud APIs](https://ovh.github.io/node-ovh/img/logo.png)](https://ovh.github.io/node-ovh)\n\nThe easiest way to use the [OVHcloud.com](https://www.ovhcloud.com) APIs in your [node.js](https://nodejs.org/) applications.\n\n[![NPM Version](https://img.shields.io/npm/v/ovh.svg?style=flat)](https://www.npmjs.org/package/ovh)\n[![Build Status](https://img.shields.io/travis/ovh/node-ovh.svg?style=flat)](https://travis-ci.org/ovh/node-ovh)\n[![Coverage Status](https://img.shields.io/coveralls/ovh/node-ovh.svg?style=flat)](https://coveralls.io/r/ovh/node-ovh?branch=master)\n\n```js\n// Create your first application tokens here: https://api.ovh.com/createToken/?GET=/me\nvar ovh = require('@ovhcloud/node-ovh')({\n  appKey: process.env.APP_KEY,\n  appSecret: process.env.APP_SECRET,\n  consumerKey: process.env.CONSUMER_KEY\n});\n\novh.request('GET', '/me', function (err, me) {\n  console.log(err || 'Welcome ' + me.firstname);\n});\n```\n\nYou can also use the promised version like this:\n```js\novh.requestPromised('GET', '/me')\n  .then(function (response) {\n    //Do what you want\n  })\n  .catch(function (err) {\n    //Return an error object like this {error: statusCode, message: message}\n  });\n```\n\n## Installation\n\nThe easiest way to get the latest stable release is to grab it from the\n[npm registry](https://npmjs.org/package/@ovhcloud/node-ovh).\n\n```bash\n$ npm install @ovhcloud/node-ovh\n```\n\nAlternatively, you may get latest development version directly from Git.\n\n```bash\n$ npm install git://github.com/ovh/node-ovh.git\n```\n\n## Example Usage\n\n### OAuth2\n\n#### 1. Generate credentials\n\nGenerate a valid pair of clientID/clientSecret following this [documentation](https://help.ovhcloud.com/csm/en-manage-service-account?id=kb_article_view\u0026sysparm_article=KB0059343)\n\n#### 2. Create an OVHcloud API client \n\n```js\nvar ovh = require('@ovhcloud/node-ovh')({\n  clientID: 'YOUR_CLIENT_ID'\n  clientSecret: 'YOUR_CLIENT_SECRET'\n  endpoint: 'ovh-eu',\n});\n```\n\nDepending on the API you want to use, you may set the endpoint to:\n* `ovh-eu` for OVHcloud Europe API\n* `ovh-us` for OVHcloud US API\n* `ovh-ca` for OVHcloud Canada API\n\n\n### Application Key/ApplicationSecret\n\n#### 1. Create an application\n\nDepending the API you plan to use, you need to create an application on the below\nwebsites:\n\n* [OVHcloud Europe](https://eu.api.ovh.com/createApp/)\n* [OVHcloud US](https://api.us.ovhcloud.com/createApp/)\n* [OVHcloud North-America](https://ca.api.ovh.com/createApp/)\n* [SoYouStart Europe](https://eu.api.soyoustart.com/createApp/)\n* [SoYouStart North-America](https://ca.api.soyoustart.com/createApp/)\n* [Kimsufi Europe](https://eu.api.kimsufi.com/createApp/)\n* [Kimsufi North-America](https://ca.api.kimsufi.com/createApp/)\n\nOnce created, you will obtain an **application key (AK)** and an **application\nsecret (AS)**.\n\n#### 2. Authorize your application to access to a customer account\n\nTo allow your application to access to a customer account using an OVHcloud API,\nyou need a **consumer key (CK)**.\n\nHere is a sample code you can use to allow your application to access to a\ncomplete account.\n\nDepending the API you want to use, you need to specify the below API endpoint:\n\n* OVHcloud Europe: ```ovh-eu``` (default)\n* OVHcloud US: ```ovh-us```\n* OVHcloud North-America: ```ovh-ca```\n* SoYouStart Europe: ```soyoustart-eu```\n* SoYouStart North-America: ```soyoustart-ca```\n* Kimsufi Europe: ```kimsufi-eu```\n* Kimsufi North-America: ```kimsufi-ca```\n\n```js\nvar ovh = require('@ovhcloud/node-ovh')({\n  endpoint: 'ovh-eu',\n  appKey: 'YOUR_APP_KEY',\n  appSecret: 'YOUR_APP_SECRET'\n});\n\novh.request('POST', '/auth/credential', {\n  'accessRules': [\n    { 'method': 'GET', 'path': '/*'},\n    { 'method': 'POST', 'path': '/*'},\n    { 'method': 'PUT', 'path': '/*'},\n    { 'method': 'DELETE', 'path': '/*'}\n  ]\n}, function (error, credential) {\n  console.log(error || credential);\n});\n```\n\n```bash\n$ node credentials.js\n{ validationUrl: 'https://api.ovh.com/auth/?credentialToken=XXX',\n  consumerKey: 'CK',\n  state: 'pendingValidation' }\n```\n\nThis consumer key can be scoped with a **specific authorization**.\nFor example if your application will only send SMS:\n\n```javascript\novh.request('POST', '/auth/credential', {\n  'accessRules': [\n    { 'method': 'POST', 'path': '/sms/*/jobs'},\n  ]\n}, function (error, credential) {\n  console.log(error || credential);\n});\n```\n\nOnce the consumer key will be authorized on the specified URL,\nyou'll be able to play with the API calls allowed by this key.\n\n#### 3. Let's play!\n\nYou are now be able to play with the API. Look at the\n[examples available online](https://ovh.github.io/node-ovh#examples).\n\nYou can browse the API schemas using the web consoles of the APIs:\n\n* [OVHcloud Europe](https://eu.api.ovh.com/console/)\n* [OVHcloud US](https://api.us.ovhcloud.com/console/)\n* [OVHcloud North-America](https://ca.api.ovh.com/console/)\n* [SoYouStart Europe](https://eu.api.soyoustart.com/console/)\n* [SoYouStart North-America](https://ca.api.soyoustart.com/console/)\n* [Kimsufi Europe](https://eu.api.kimsufi.com/console/)\n* [Kimsufi North-America](https://ca.api.kimsufi.com/console/)\n\n## Migration from 1.x.x to 2.x.x without Proxy support\n\nFor example if you use the OVHcloud Europe API, you'll have to check on https://eu.api.ovh.com/console/ the endpoints available for your feature.\n\nIn order to have the informations about the bill with id \"0123\".\n+ Before in 1.x.x with Proxy:\n\n```javascript\novh.me.bill[\"0123\"].$get(function (err, billInformation) {\n\n});\n```\n\n+ Now in 2.x.x with promise:\n\n```javascript\novh.requestPromised('GET', '/me/bill/0123') //This route has been found at https://eu.api.ovh.com/console/\n  .then(function (billInformation) {\n\n  })\n  .catch(function (err) {\n\n  });\n```\n\n## Full documentation and examples\n\nThe full documentation is available online: https://ovh.github.io/node-ovh.\n\n## Hacking\n\n### Get the sources\n\n```bash\ngit clone https://github.com/ovh/node-ovh.git\ncd node-ovh\n```\n\nYou've developed a new cool feature? Fixed an annoying bug? We'd be happy\nto hear from you!\n\n### Run the tests\n\nTests are based on [mocha](https://mochajs.org/).\nThis package includes unit and integration tests.\n\n```\ngit clone https://github.com/ovh/node-ovh.git\ncd node-ovh\nnpm install -d\nnpm test\n```\n\nIntegration tests use the OVHcloud /domain/zone API, the tokens can be created\n[here](https://api.ovh.com/createToken/).\n\n```\nexport APP_KEY=xxxxx\nexport APP_SECRET=yyyyy\nexport CONSUMER_KEY=zzzzz\nexport DOMAIN_ZONE_NAME=example.com\nnpm run-script test-integration\n```\n\n### Documentation\n\nThe documentation is based on [Github Pages](https://pages.github.com/) and is\navailable in the *gh-pages* branch.\n\n\n## Supported APIs\n\n### OVHcloud Europe\n\n- **Documentation**: https://eu.api.ovh.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://eu.api.ovh.com/console\n- **Create application credentials**: https://eu.api.ovh.com/createApp/\n- **Create script credentials** (all keys at once): https://eu.api.ovh.com/createToken/\n\n### OVHcloud US\n\n- **Documentation**: https://api.us.ovhcloud.com/\n- **Console**: https://api.us.ovhcloud.com/console/\n- **Create application credentials**: https://api.us.ovhcloud.com/createApp/\n- **Create script credentials** (all keys at once): https://api.us.ovhcloud.com/createToken/\n\n### OVHcloud North America\n\n- **Documentation**: https://ca.api.ovh.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://ca.api.ovh.com/console\n- **Create application credentials**: https://ca.api.ovh.com/createApp/\n- **Create script credentials** (all keys at once): https://ca.api.ovh.com/createToken/\n\n### SoYouStart Europe\n\n- **Documentation**: https://eu.api.soyoustart.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://eu.api.soyoustart.com/console/\n- **Create application credentials**: https://eu.api.soyoustart.com/createApp/\n- **Create script credentials** (all keys at once): https://eu.api.soyoustart.com/createToken/\n\n### SoYouStart North America\n\n- **Documentation**: https://ca.api.soyoustart.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://ca.api.soyoustart.com/console/\n- **Create application credentials**: https://ca.api.soyoustart.com/createApp/\n- **Create script credentials** (all keys at once): https://ca.api.soyoustart.com/createToken/\n\n### Kimsufi Europe\n\n- **Documentation**: https://eu.api.kimsufi.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://eu.api.kimsufi.com/console/\n- **Create application credentials**: https://eu.api.kimsufi.com/createApp/\n- **Create script credentials** (all keys at once): https://eu.api.kimsufi.com/createToken/\n\n### Kimsufi North America\n\n- **Documentation**: https://ca.api.kimsufi.com/\n- **Community support**: api-subscribe@ml.ovh.net\n- **Console**: https://ca.api.kimsufi.com/console/\n- **Create application credentials**: https://ca.api.kimsufi.com/createApp/\n- **Create script credentials** (all keys at once): https://ca.api.kimsufi.com/createToken/\n\n## Related links\n\n- **Contribute**: https://github.com/ovh/node-ovh\n- **Report bugs**: https://github.com/ovh/node-ovh/issues\n- **Download**: https://npmjs.org/package/ovh\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovh%2Fnode-ovh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovh%2Fnode-ovh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovh%2Fnode-ovh/lists"}