新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Cannot obtain user token based on the enterprise configuration for your app

新規投稿

コメント

2件のコメント

  • LoCortes

    Good afternoon ,

    for your message, I understand that you are authenticating using JWT credentials.

     

    So, to be able to get tokens you have to enable "Generate user access tokens" on the developer console (as explained, "Allows your application to generate OAuth 2.0 access tokens for users using a JWT grant instead of the user providing credentials.").

     

    Have you had this enabled?

     

    Regards,

    0
    コメントアクション Permalink
  • spilafis

    Hi there, I my case was able to resolve this issue by finding a user and using that user to access the folder.

    The app needs to have permission to Generate User Access Token, use Enterprise access, have access to Read and Write all files and still the user needs to have acess to the folder, using JWT.

    It looks like the problem I was having was that the "current" (jwt) user of the app, or the user that was related to the creation of the app which seemed to be a special user, could not be used to access content.
    So either trying to get a user token for that user or trying to access folders was causing errors:
    "Cannot obtain user token based on the enterprise configuration for your app" when trying to get a user token.
    "Invalid value 'd_.... 'folder' with value 'd_...' not found" when trying to query a folder.

    What I did was, knowing a user that had access to the folder, use get all users ( https://developer.box.com/v2.0/docs/get-all-users ) sending the filter_term param to find that user id, and then generate a user token and use the content api with that token.
    That finally worked.

    0
    コメントアクション Permalink

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