Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

JWT API file upload error

Answered
New post

Comments

2 comments

  • Official comment
    Kourtney

    You need to validate that the user associated with your token either owns or is collaborating on the folder you're trying to upload the file to. To verify, which user is associated with your token I recommend using the get current user endpoint. I suspect you're probably using JWT authentication, which by default uses a token for the application's service account

    Comment actions Permalink
  • Mihail

    in the end, the error looks like this:

    upload_response object(stdClass)#32 (7) {
      ["type"]=>
      string(5) "error"
      ["status"]=>
      int(404)
      ["code"]=>
      string(9) "not_found"
      ["context_info"]=>
      object(stdClass)#29 (1) {
        ["errors"]=>
        array(1) {
          [0]=>
          object(stdClass)#19 (3) {
            ["reason"]=>
            string(17) "invalid_parameter"
            ["name"]=>
            string(6) "parent"
            ["message"]=>
            string(78) "Invalid value 'd_126219502011'. 'parent' with value 'd_126219502011' not found"
          }
        }
      }
      ["help_url"]=>
      string(38) "http://developers.box.com/docs/#errors"
      ["message"]=>
      string(9) "Not Found"
      ["request_id"]=>
      string(16) "dihebegl0gbm7qt8"
    }
    0
    Comment actions Permalink

Please sign in to leave a comment.