JWT OAuth - 'cannot obtain token based on the enterprise configuration for your app'
Due to their being no official PHP SDK, and the existing community SDK's not implementing JWT, I've started building my own.
After much battling I've managed to get the JWT auth set up, then I get the following error:
'Cannot obtain token based on the enterprise configuration for your app'
Currently the account is set up as 'OAuth 2.0 with JWT (Server Authentication)' with 'Application Access', all Advanced features enabled
Which settings am I missing? There doesn't seem to be anything obvious.
-
Hi, 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 for that user id, and use the content api with that token.
That finally worked.
サインインしてコメントを残してください。
コメント
2件のコメント