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
You can always try analyzing what your JWT output looks like within jwt.io
A common issue I see with developers calling plugin functions is that they require arguments to be passed in the correct order and do not honor keywords:
https://docs.appian.com/suite/help/25.1/passing-arguments.html#by-position
For example, I believe createtoken() expects the custom claims as the 4th position and your screenshot has it 8th.
Hi, Steven
Thank you for answer.
I tried switching the position and the error type changed.[Error] *Body of HTTP Response
body: "{"error":"invalid_grant","error_description":"Signature verification failed"}"
The generated JWT seems invalid, and when I checked it on jwt.io, it said that the public key was missing.
But, I set public_key_ID in 'kid'.
If you know, please let me know.
It looks like you have the private key constant in the public key field