Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
The easiest way to use the OVH.com APIs in your node.js applications.
// Create your first application tokens here: https://api.ovh.com/createToken/?GET=/me
var ovh = require('ovh')({
appKey: process.env.APP_KEY,
appSecret: process.env.APP_SECRET,
consumerKey: process.env.CONSUMER_KEY
});
ovh.request('GET', '/me', function (err, me) {
console.log(err || 'Welcome ' + me.firstname);
});
The easiest way to get the latest stable release is to grab it from the npm registry.
$ npm install ovh
Alternatively, you may get latest development version directly from Git.
$ npm install git://github.com/ovh/node-ovh.git
Depending the API you plan yo use, you need to create an application on the below websites:
Once created, you will obtain an application key (AK) and an application secret (AS).
To allow your application to access to a customer account using an OVH API, you need a consumer key (CK).
Here is a sample code you can use to allow your application to access to a complete account.
Depending the API you want to use, you need to specify the below API endpoint:
ovh-eu
(default)ovh-ca
runabove-ca
soyoustart-eu
soyoustart-ca
kimsufi-eu
kimsufi-ca
var ovh = require('ovh')({
endpoint: 'ovh-eu',
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET'
});
ovh.request('POST', '/auth/credential', {
'accessRules': [
{ 'method': 'GET', 'path': '/*'},
{ 'method': 'POST', 'path': '/*'},
{ 'method': 'PUT', 'path': '/*'},
{ 'method': 'DELETE', 'path': '/*'}
]
}, function (error, credential) {
console.log(error || credential);
});
$ node credentials.js
{ validationUrl: 'https://api.ovh.com/auth/?credentialToken=XXX',
consumerKey: 'CK',
state: 'pendingValidation' }
This consumer key can be scoped with a specific authorization. For example if your application will only send SMS:
ovh.request('POST', '/auth/credential', {
'accessRules': [
{ 'method': 'POST', 'path': '/sms/*/jobs'},
]
}, function (error, credential) {
console.log(error || credential);
});
Once the consumer key will be authorized on the specified URL, you'll be able to play with the API calls allowed by this key.
You are now be able to play with the API. Look at the examples available online.
You can browse the API schemas using the web consoles of the APIs:
The full documentation is available online: http://ovh.github.io/node-ovh.
git clone https://github.com/ovh/node-ovh.git
cd node-ovh
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !
Tests are based on mocha. This package includes unit and integration tests.
git clone https://github.com/ovh/node-ovh.git
cd node-ovh
npm install -d
npm test
Integration tests use the OVH /domain/zone API, the tokens can be created here.
export APP_KEY=xxxxx
export APP_SECRET=yyyyy
export CONSUMER_KEY=zzzzz
export DOMAIN_ZONE_NAME=example.com
npm run-script test-integration
The documentation is based on Github Pages and is available in the gh-pages branch.
FAQs
Official Node.js wrapper for the OVH APIs
We found that ovh demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.