Getting 403 error while creating app user
I am getting the below exception while trying to create an app user.
Exception in thread "main" com.box.sdk.BoxAPIException: The API returned an error code: 403
at com.box.sdk.BoxAPIResponse.(BoxAPIResponse.java:70)
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:421)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:209)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:184)
at com.box.sdk.BoxUser.createEnterpriseUser(BoxUser.java:123)
at com.box.sdk.BoxUser.createAppUser(BoxUser.java:69)
at com.box.sdk.BoxUser.createAppUser(BoxUser.java:55)
The client id, client secret, public key id, private key, password and enterprise id are all valid. I am able to use SDK to upload files with an already created app user. But now that I am trying to create a new app user it is not allowing me to do so.
-
Good morning ,
to create APP Users you can not use another APP User but the Service account related to your application.
I understand that the authentication you are doing is sending the box_sub_type as "user" and the jwtPayload using the app user.
You have to do the same but using as box_sub_type as "enterprise" and to generate the jwtPayload you have to use your enterprise ID.
Thanks
サインインしてコメントを残してください。
コメント
1件のコメント