Exception raised when get AdminToken
AnsweredI use code from SDK example:
var boxConfig = new BoxConfig(CLIENT_ID, CLIENT_SECRET, ENTERPRISE_ID, privateKey, JWT_PRIVATE_KEY_PASSWORD, JWT_PUBLIC_KEY_ID);
var boxJWT = new BoxJWTAuth(boxConfig);
var adminToken = boxJWT.AdminToken();
This code - boxJWT.AdminToken() - raise an exception
Additional information: {"error":"unauthorized_client","error_description":"This app is not authorized by the enterprise admin"}
What I doing wrong?
-
The problem is that you must grant access since bussiness config.
Follow this: https://box-content.readme.io/v2.0/docs/app-auth
And this: https://box-content.readme.io/v2.0/docs/connecting-your-developer-enterprise
-
- Go to https://app.box.com/master/settings/openbox
- Find "Custom Applications" box and click "Authorize new app"
- Insert your ClientId as API code
And do not delete anything from your account as it mentioned in comments above =).
Please sign in to leave a comment.
Comments
7 comments