kwent/syno

HTTP Code 402

Closed this issue · 2 comments

Hello,

I've make a quick try of the library but get a 402 error:

var Syno = require('./dist/syno');
var syno = new Syno({
    // Requests protocol : 'http' or 'https' (default: http)
    protocol: 'http',
    // DSM host : ip, domain name (default: localhost)
    host: 'my_synology',
    // DSM port : port number (default: 5000)
    port: '5000',
    // DSM User account (required)
    account: 'yyy',
    // DSM User password (required)
    passwd: 'xxx'
});

syno.as.listAlbums(function(data){
    console.log(data);
});

The result is:

/usr/local/Cellar/node/0.10.22/bin/node test_syno.js
{ [Error: Permission denied] code: 402 }

Are you sure you are logged with a user with enough permissions ?

Could you also tell me the content of :

http://my_synology:5000/webapi/query.cgi?api=SYNO.API.Info&method=Query&version=1&query=SYNO.AudioStation.

Regards

I think it's just an issue of permission. [Permission Denied]