box-api

Box API 2.0 Create Folder 404 Error


I am using Box API version 2.0 on a mobile device. I could able to get the file upload/download and get folder/file info working fine.

When I try to create a new folder, I get 404 as HTTP status.

Request URL address https://api.box.com/2.0/folders/0 (Creating folder in root).

Additional headers

  1. Authentication header

  2. L"Content-Type", L"application/x-www-form-urlencoded"

  3. L"Content-Length", 9

POST request body "name=test"

Any help would be appreciated.

Best regards, Karthik


Solution

  • The post body should be JSON, not a form. In your case you would send something like:

    {
    "name": "test"
    }