C# How to get collaborators for folders in Box

新規投稿

コメント

3件のコメント

  • jcleblanc

    Hi ,

     

    I think this might have to do with the use of a developer token. The invalid session error will come back once the token has expired, and for a developer token that is 1 hour after it was generated. 

     

    I'd suggest using the JWT auth flow or OAuth 2 flow, depending on the type of application that you're trying to build.

     

    Hope that helps,

    Jon

    0
    コメントアクション パーマリンク
  • BAILANDO

    Hi,

    i wrote a code which's working. But when i want to list folders in my personal box via app, then i need to use developer token. Because when i use oauth JWT authentication, then my app showing empty box root folder and when i create folder via api, then i can see folder only in C# program when i list all folders from root, but not in my personal box account.

     

    It's possible to access my personal box folders with JWT app in C#?

     

    Thank you

    0
    コメントアクション パーマリンク
  • Kourtney

     The developer token is associated with the user who clicks the button in the developer console to generate the token. However, JWT apps use a token associated with the applications service account by default. You're only going to be able to successfully interact with the content the user associated with the token either owns or has collaborator access to, just like in box.com directly. 

     

    If you'd like to obtain a token for your user instead of the service account you need to do this in the JWT assertion. You'll pass your user ID into the sub claim: https://developer.box.com/guides/authentication/jwt/without-sdk/#3.-Create-JWT-assertion

     

    Best, 

    Kourtney

    Box Technical Support Engineer

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。