Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Getting an external file's information via the API

Nouvelle publication

Commentaires

5 commentaires

  • cbetta

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

    0
    Actions pour les commentaires Permalien
  • 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
    Actions pour les commentaires Permalien
  • cbetta

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

    0
    Actions pour les commentaires Permalien
  • i3arnon

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

    0
    Actions pour les commentaires Permalien
  • 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
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.