JWT python SDK '400' boxsdk.exception.BoxAPIException: Message: A request parameter was invalid
I got the error message when I try to run API with my approved JWT App. I used the SDK of JWT in Python and I am sure that my admin user has already approved my JWT application. I found two same issues in the community but there is no solution for this issue. The two issues are JWT Authentication fails to obtain the user access token & boxsdk.exception.BoxOAuthException forJWT authorization Python
The code was:
auth = JWTAuth.from_settings_file('/Path_to_file/config.json')
client = Client(auth)
service_account = client.user().get()
print('Service Account user ID is {0}'.format(service_account.id))
{
"boxAppSettings": {
"clientID": "............................",
"clientSecret": "..............................",
"appAuth": {
"publicKeyID": "xxxxx",
"privateKey": "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXp\nXJA=\n-----END ENCRYPTED PRIVATE KEY-----\n",
"passphrase": "XXXXXXXXXXXXXXXX"
}
},
"enterpriseID": "XXXXX"
The error response:
boxsdk.exception.BoxOAuthException:
Message: A request parameter was invalid
Status: 400
URL: https://api.box.com/oauth2/token
Method: POST
Could someone help me with this error message? What should I change or deal with this problem?
Please sign in to leave a comment.
Comments
2 comments