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

iOS SDK: Get ID of folder give a folder name

New post

Comments

1 comment

  • Murtza

     You can use the Box API search endpoint to query a folder by name. If the search endpoint finds the folder, the response will include the folder's id.

     

    Here is an example that shows how to make this call with the Box iOS SDK:

     

     

    BOXContentClient *contentClient = [BOXContentClient defaultClient]; 
    
    BOXSearchRequest *searchRequest = [contentClient searchRequestWithQuery:@"Test Folder" inRange:NSMakeRange(0, 1000)];      
    
    [searchRequest performRequestWithCompletion:^(NSArray *items, NSUInteger totalCount, NSRange range, NSError *error) {
    // If successful, items will be non-nil and contain BOXItem model objects; otherwise, error will be non-nil. 
    }];

     

    0
    Comment actions Permalink

Please sign in to leave a comment.