Skip to content

Got Not authorized when use dir function #16

Description

@slim-hmidi

I'm trying to use the function dir:

const Netstorage = require('netstorageapi')

// Defaults: SSL: false
// By default no proxy is set
const config = {
hostname: "hostname",
keyName: "keyName",
key: "key",
cpCode: "cpCOde",
ssl: false,
}
// Don't expose KEY on your public repository.

const ns = new Netstorage(config)

ns.list('test', (err, response, body) => {
      if (err) {
        console.log('err: ', err)
      }
      console.log('body: ', body)
    })

Whatever the path I put (valid or not) I get the same message:

body:  { message: 'Not Authorized.' }

What's wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions