Join BoxWorks in San Francisco Nov 12-13! Keynotes, product demos, and Box Master Classes. Reserve your spot!

Getting an external file's information via the API

New post

Comments

5 comments

  • cbetta

     what kind of authentication are you using with our API? This might restrict what files the app has access to.

    0
    Comment actions Permalink
  • i3arnon

    What do you mean by which authentication?

     

    I have an application, which is authorized for a box enterprise and I'm getting an admin token via the .NET SDK.

    I've also tried getting a user token, but the results were the same.

    0
    Comment actions Permalink
  • cbetta

    Excellent. Are you authenticating using an OAuth 2 flow, or using a server side JWT?

    0
    Comment actions Permalink
  • i3arnon

     I'm using JWT. Specifically I create a BoxJWTAuth instance and call AdminClient() on it.

    0
    Comment actions Permalink
  • cbetta

     ok, so by default a JWT app authenticates as a Service Account, not as a specific user. To authenticate as a user, either get a user access token, or use the As-User header.

     

    When you authenticate as an actual managed Box user with access to the external file. the API call should work. By default, the Service Account would not have access to the file.

    0
    Comment actions Permalink

Please sign in to leave a comment.