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

Modifying tags with javascript/jquery

New post


1 comment

  • KPAX

    Figured it out:


    writeTags = function(tags, callback)
         var authHeader = "Bearer " + access_token;

         var tagsArray = tags.split(',');
         var url = "https://api.box.com/2.0/files/" + currentFile.id;

              url: url,
              type: 'PUT',
              data: JSON.stringify({tags:tagsArray}),
              beforeSend: function(xhr) {
                   xhr.setRequestHeader("Authorization", authHeader);
             }, success: function(data){

             error: function(xhr, textStatus, error){
                  console.log(xhr, textStatus, error);}


    Comment actions Permalink

Please sign in to leave a comment.