Welcome to the new Box Support website. Check out all the details here on what’s changed.

Can not find folders made by API

New post

Comments

5 comments

  • mwiller

     When your application uses JWT authentication, you're generally authenticating as a special account called the Service Account — not your own personal Box account that you can view in the web application.  Folders created in the Service Account are not shared with your personal account by default, and vice-versa.  If you want to create Folders in your personal account using JWT auth, you'll need to use the As-User header, as described in the linked article.

    0
    Comment actions Permalink
  • Kourtney

    Hello , 

     

    Thanks so much for using the platform and development forum! 

     

    When you create a JWT application it automatically generates an associated service account (AutomationUser), which, by default, is who makes all the API calls for your application. You can verify this by using the get current user endpoint. Therefore, when you're making API calls to, for example, upload a file, they're going to be uploaded into the folder tree of the service account and not of your own Box account. Hence, it's expected behavior that if you log in to box.com, you will not see the content in your folder tree. Please note that service accounts do not have login credentials, so you cannot log into them via box.com. The only way to see their folder tree in the UI is to use the content manager, in the admin console and searching for the application name. 

     

    Let me know if you have any questions or need any clarification. 

     

    Best, 

    Kourtney 

    0
    Comment actions Permalink
  • Bani
     when i am creating folder with using "AS-USER"  parameter in header while api calling that folder is not creating but without use "AS-USER" in header folder is created and  getting this responce :
     
    Array
    (
        [type] => folder
        [id] => 5***phone number removed for privacy***
        [sequence_id] => 0
        [etag] => 0
        [name] => Bez Photo
        [created_at] => 2018-10-23T04:19:51-07:00
        [modified_at] => 2018-10-23T04:19:51-07:00
        [description] => 
        [size] => 0
        [path_collection] => Array
            (
                [total_count] => 1
                [entries] => Array
                    (
                        [0] => Array
                            (
                                [type] => folder
                                [id] => 0
                                [sequence_id] => 
                                [etag] => 
                                [name] => All Files
                            )
    
                    )
    
            )
    
        [created_by] => Array
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [modified_by] => Array
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [trashed_at] => 
        [purged_at] => 
        [content_created_at] => 2018-10-23T04:19:51-07:00
        [content_modified_at] => 2018-10-23T04:19:51-07:00
        [owned_by] => Array
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [shared_link] => 
        [folder_upload_email] => 
        [parent] => Array
            (
                [type] => folder
                [id] => 0
                [sequence_id] => 
                [etag] => 
                [name] => All Files
            )
    
        [item_status] => active
        [item_collection] => Array
            (
                [total_count] => 0
                [entries] => Array
                    (
                    )
    
                [offset] => 0
                [limit] => 100
                [order] => Array
                    (
                        [0] => Array
                            (
                                [by] => type
                                [direction] => ASC
                            )
    
                        [1] => Array
                            (
                                [by] => name
                                [direction] => ASC
                            )
    
                    )
    
            )
    
    )
    when call folder "Bez Photo" info with id = 5***phone number removed for privacy***via api getting this response :
    Array
    (
        [type] => folder
        [id] => 5***phone number removed for privacy***
        [sequence_id] => 0
        [etag] => 0
        [name] => Bez Photo
        [created_at] => 2018-10-23T04:19:51-07:00
        [modified_at] => 2018-10-23T04:19:51-07:00
        [description] => 
        [size] => 0
        [path_collection] => stdClass Object
            (
                [total_count] => 1
                [entries] => Array
                    (
                        [0] => stdClass Object
                            (
                                [type] => folder
                                [id] => 0
                                [sequence_id] => 
                                [etag] => 
                                [name] => All Files
                            )
    
                    )
    
            )
    
        [created_by] => stdClass Object
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [modified_by] => stdClass Object
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [trashed_at] => 
        [purged_at] => 
        [content_created_at] => 2018-10-23T04:19:51-07:00
        [content_modified_at] => 2018-10-23T04:19:51-07:00
        [owned_by] => stdClass Object
            (
                [type] => user
                [id] =>***phone number removed for privacy***
                [name] => Behzad Bani
                [login] => ***email address removed for privacy***
            )
    
        [shared_link] => 
        [folder_upload_email] => 
        [parent] => stdClass Object
            (
                [type] => folder
                [id] => 0
                [sequence_id] => 
                [etag] => 
                [name] => All Files
            )
    
        [item_status] => active
        [item_collection] => stdClass Object
            (
                [total_count] => 0
                [entries] => Array
                    (
                    )
    
                [offset] => 0
                [limit] => 100
                [order] => Array
                    (
                        [0] => stdClass Object
                            (
                                [by] => type
                                [direction] => ASC
                            )
    
                        [1] => stdClass Object
                            (
                                [by] => name
                                [direction] => ASC
                            )
    
                    )
    
            )
    
    )
    so i can not see this folder "Bez Photo" created via api. in app.box panel.
    0
    Comment actions Permalink
  • Bani

    Can somebody help me with this issue? 

    We change the headline code but still can not see the files in box. 

    0
    Comment actions Permalink
  • Kourtney

     Could you please open a support case with these details so we can help you further investigate? 

    0
    Comment actions Permalink

Please sign in to leave a comment.