akamai / akamai/NetStorageKit-Node

Got Not authorized when use dir function

Open
#16 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
18
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ns.list entry point shown in the report and trace how the hostname, keyName, key, and cpCode configuration is used for authorization. Compare those inputs with the NetStorage API requirements; done means identifying why valid and invalid paths return the same response and documenting or fixing the actionable cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.