Dear anyone,
I am currently trying to execute Box API that uses JWT,
But the following issue occurred when executing the Box API to obtain an access token.
If someone else has sent about the same issue and it has been resolved,
or alternative solutions you may suggest would be highly appreciated.
[Error details] *This is written in the body of the HTTP response.
"{"error":"invalid_grant","error_description":"Please check the 'box_sub_type' claim. The value for 'box_sub_type' is invalid"}"
[Procedure]
1.Obtain a JWT using the createtoken() function of the “Box” Plug-ins.
2.Execute the Box API to obtain Box's Access Token. *An error occurs here.
[Already Confirmed]
1.Applications created in Box have been approved by the Box administrator.
2.'box_sub_type' and 'sub' classifications must match.
Thank you very much in advance for your assistance.
Best regards,
・HTTP Responese
・Component of Procedure 1 (ExpressionRule)
・Component of Procedure 2 (Integration Object)
The "URL" is the Box API endpoint for obtaining an access token.
Discussion posts and replies are publicly visible
The error indicates an issue with the 'sub' claim in the JWT payload, specifically related to the 'box_sub_type' parameter. The 'box_sub_type' must be correctly set to either "user" or "enterprise". If it's set to "user", the 'sub' claim must be a valid Box user ID. If it's set to "enterprise", the 'sub' claim must be a valid Box enterprise ID. To resolve this, verify that the 'box_sub_type' value is correct (either "user" or "enterprise") and that the corresponding 'sub' claim value is a valid Box ID for that type.
So just confirm if the 'box_sub_type' is 'enterprise' for 'sub' to have an enterprise id (line 7 in your expression rule) else you will need to adjust these two parameters to complement each other.
Hi, Harsha
Thank you for answer.I have confirmed that 'box_sub_type' and 'sub' are Enterprise and EnterpriseID.
I tried the same thing with the ’user’ type, but the result was the same.