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

Comments

18 comments

  • Alex Novotny

    I'm not sure I understand what you mean by email id/mail id... can you elaborate? 

    0
    Comment actions Permalink
  • Tonia J. Sebastian

    Thanks Alex for the fast reply.                                                                                                                                                                                                            

    I am using search content API  to find files that contain a specific email id. When I used a word or a text in the query, it was working fine, but when I use an email id to be searched in the files, it is not working. It is show that no files have the specified email id in it's content.

    Example : 'https://api.box.com/2.0/search?query='+emailId

    The 'emailId' is actual present in a file. But the response returns zero entries.

    0
    Comment actions Permalink
  • Tonia J. Sebastian

    This seems to be working now. It was because I did not add my service account as collaborator.

    Another issue I am facing is that, even though service account was added as collaborator to the file and folder, search API is not giving desired output. This issue is shown in the company BOX account. Can you help me with this?

    0
    Comment actions Permalink
  • Alex Novotny

    Can you show me what you mean about "shown in the company BOX account?"

     

    0
    Comment actions Permalink
  • Tonia Sebastian

    I have a BOX application in my company BOX account. The search API is giving me 0 results but the status code is 200. I am facing this issue when I am logged into to my company BOX account. The same application exists in my personal BOX account which is giving me desired output. Can't find what is going wrong in the company BOX account.

     

    0
    Comment actions Permalink
  • Alex Novotny

    Does the application you are using to search for content have access to the content you are looking for? Alot of times, I find that the service account of the application has not been collaborated when search results aren't being returned. 

    0
    Comment actions Permalink
  • Tonia Sebastian

    The service account of the application has been collaborated with the search content as co-owner

    0
    Comment actions Permalink
  • Alex Novotny

    You are searching for content in your company box account, using an application you made in your personal box account? Do you have the client id of the application? And may I see the code you are running? 

    0
    Comment actions Permalink
  • Tonia Sebastian

    I am searching for a content in my company account using the application in the company account.

    Client id: 2fhv5vzik0ssjsk8xpyw77t47ck88hnn

     

    code:

    var searchText =  document.getElementById('search_id').value;
               var url = 'https://api.box.com/2.0/search?query='+searchText;
                xmlHttp.open("GET", url, false );
                xmlHttp.setRequestHeader('Authorization', authorization);
                xmlHttp.send(null);
                var result = JSON.parse(xmlHttp.responseText);
     
    0
    Comment actions Permalink
  • Alex Novotny

    To verify - this code works in when you use it in your personal box account? 

    0
    Comment actions Permalink
  • Tonia Sebastian

    Yes. This code works fine in personal box account. Only difference I could find is few configurations missing in company account. Configuration are

    1. Manage users

    2. Manage web-hooks

    3. Make API calls using the as-user headers

    0
    Comment actions Permalink
  • Alex Novotny

    Did you create a second app in your personal? What is the client id for that one? 

    0
    Comment actions Permalink
  • Tonia Sebastian

    Client Id for app in personal account : tsrgpp9as1jfmtl2wymfibzixff98yu1

    0
    Comment actions Permalink
  • Alex Novotny

    It looks like the company application is configured a bit differently than the personal one. Can you confirm the company app has a selection here? As well as that the app has been authorized by an admin? 

    0
    Comment actions Permalink
  • Tonia Sebastian

    Okay. I will update this and get the app reauthorize. 

    Will update you if that works.

     

    0
    Comment actions Permalink
  • Alex Novotny

    Thanks. Not 100% this will work... it's odd that it's working in your personal... so something in the settings must be off. 

    0
    Comment actions Permalink
  • Tonia Sebastian

    Unfortunately the above configuration cannot be approved for a company account.

     

    0
    Comment actions Permalink
  • Alex Novotny

    I believe you have to have that app + enterprise access scope selected in order to use search for content not owned by the service account. 

    0
    Comment actions Permalink

Post is closed for comments.