Skip to main content
Question

Attempting to update file info returns "invalid parameter" item error

  • May 22, 2025
  • 5 replies
  • 48 views

Forum|alt.badge.img

Hi there

 

When trying to move an item I send a request that updates the parent id of a file and it returns an error 404 with reason "invalid parameter" item. But there is no item parameter as far as I can see in the docs, it's also a value that I don't send: f_61412404350 which is the id of the file (a path parameter in this request) prefixed with f_. Is this something internal or am I supposed to send an undocumented item parameter?

 

 

{"type":"error","status":404,"code":"not_found","context_info":{"errors":[{"reason":"invalid_parameter","name":"item","message":"Invalid value 'f_61412404350'. 'item' with value 'f_61412404350' not found"}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Not Found","request_id":"q3mbdefya6q6guoc"}

 

5 replies

Forum|alt.badge.img

 my gut feeling is you are getting this because you aren't authenticated as a user that has access to that file. You could get the current user for the token/client you have (`/users/me`) and see if this is a user that indeed has access to that file.


Forum|alt.badge.img

They're a test file and folder that are created in the line above with the same (only) access token. Any other idea? It can also be deleted again by this token the lines beneath it, given the same id so it appears to be a valid file id that I have access to.

 

Here's what postman echoes back to my PUT request:

 

{
    "args": {
        "fields":"parent"
    },
    "data": {
        "parent": {
            "id":"***number removed for privacy***98"
        }
    },
    "files": {},
    "form": {},
    "headers": {
        "x-forwarded-proto": "https",
        "host": "postman-echo.com",
        "content-length": "31",
        "accept": "application/json",
        "authorization": "Bearer JrUalrqUxWB47Pb72dVA50SmEIATxDtA",
        "content-type": "application/json",
        "user-agent": "GuzzleHttp/6.3.3 curl/7.51.0 PHP/7.1.1",
        "x-forwarded-port": "443"
    },
    "json": {
        "parent": {
            "id": "***number removed for privacy***98"
        }
    },
    "url":"https://postman-echo.com/put?fields=parent"
}

And this is what Postman echoes to the Box Content API "Move a File" postman collection request:

 

{

    "args": {},
    "data": "{\"parent\": {\"id\" : ***number removed for privacy***98}}",

    "files": {},

    "form": {},

    "headers": {

        "x-forwarded-proto": "https",

        "host": "postman-echo.com",

        "content-length": "34",

        "accept": "*/*",

        "accept-encoding": "gzip, deflate",

        "authorization": "Bearer JrUalrqUxWB47Pb72dVA50SmEIATxDtA",

        "cache-control": "no-cache",

        "content-type": "text/plain",

        "postman-token": "f85cf6c0-462a-41cc-b237-ae647809b577",

        "user-agent": "PostmanRuntime/7.4.0",

        "x-forwarded-port": "443"

    },

    "json": null,

    "url": "https://postman-echo.com/put"

}

Forum|alt.badge.img

Nevermind, while looking around in a function I use to make the request I discovered that the variables for both the id of the file to be moved and the id of the parent folder were the same resulting in me giving folder X, parent folder X, trying to move a folder inside itself.

 

The error that I got back could be improved I think, seems like internal stuff reported back to me.


Forum|alt.badge.img

100% something I agree on, and totally a thing I'm working on!


Forum|alt.badge.img

Thanks @cbetta. For me it was not working because it was not assigned to that user.

One more question is,
So can we do access our folder to specific user, that specific user can use(I mean upload/download).

Also if I share access_token with any of the user that can use my box account?