You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x] I have checked that the SDK documentation doesn't solve my issue.
[ x] I have checked that the API documentation doesn't solve my issue.
[x ] I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
[ x] I have searched Issues in this repo and my issue isn't already reported.
Description of the Issue
I am trying very basic example of authenticating with generated config.json using JWT mechanism. I am able to connect using developer token however JWT is failing. I have tried both Java and NodeJS sdk both result in same error.
I found this link which claims in free account you cannot use JWT. The post thread is from 2023 however just wanted to know my assumption regarding free account is correct or not from the previous link.
I am attaching maven project that I am trying out.
Exception in thread "main" com.box.sdk.BoxAPIResponseException: The API returned an error code [400] invalid_grant - Please check the 'sub' claim. The 'sub' specified is invalid.
at com.box.sdk.BoxAPIResponse.toBoxResponse(BoxAPIResponse.java:147)
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:616)
at com.box.sdk.BoxAPIRequest.sendWithoutRetry(BoxAPIRequest.java:325)
at com.box.sdk.BoxDeveloperEditionAPIConnection.authenticate(BoxDeveloperEditionAPIConnection.java:334)
at com.box.sdk.BoxDeveloperEditionAPIConnection.refresh(BoxDeveloperEditionAPIConnection.java:452)
at com.box.sdk.BoxAPIConnection.lockAccessToken(BoxAPIConnection.java:1126)
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:584)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:380)
at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:106)
at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:17)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:347)
at com.box.sdk.BoxJSONRequest.send(BoxJSONRequest.java:101)
at com.box.sdk.BoxUser.getCurrentUser(BoxUser.java:199)
at com.box.test.Main.main(Main.java:55)
Versions Used
Java SDK: 4.6.1
Java: 11
The text was updated successfully, but these errors were encountered:
Yes, I confirm that it does look like you're unable to use JWT with a free account (enterpriseId 0). You could mitigate this by using a different authentication method or working with a sandbox for a real enterprise id.
I'll close this ticket now. Feel free to reopen if you have additional questions.
@@mhagmajer Need little insight you mentioned in previous comment "working with a sandbox for a real enterprise id." do you mean I will need "Business Plan and higher", I went for "Personal" and I see same result.
I'll really appreciate if you could please confirm my assumption above.
Just as a side note, Oauth2 and Developer Tokens work in free account at least for basic API cannot say for all features.
Description of the Issue
I am trying very basic example of authenticating with generated config.json using JWT mechanism. I am able to connect using developer token however JWT is failing. I have tried both Java and NodeJS sdk both result in same error.
I found this link which claims in free account you cannot use JWT. The post thread is from 2023 however just wanted to know my assumption regarding free account is correct or not from the previous link.
I am attaching maven project that I am trying out.
com.box.test.zip
Steps to Reproduce
Try running attached maven project.
Expected Behavior
Should authenticate.
Error Message, Including Stack Trace
Versions Used
Java SDK: 4.6.1
Java: 11
The text was updated successfully, but these errors were encountered: