Error while authenticating the Box app with the Python SDK using JWT

So I have been trying to authenticate the Box app with the Python SDK using JWT, but I am getting an error.

Message: Please check the ‘sub’ claim. The ‘sub’ specified is invalid.
Status: 400
Method: POST”

I have crossed checked the “enterprise_id” value which is specified in the config file (the box account which I am currently using is a personal one, so the enterprise in this case was showing as ‘0’).

Also providing the python code which was written for this use-case:

from boxsdk import JWTAuth, Client

auth = JWTAuth.from_settings_file(‘/Users/pratyush/Downloads/0_pvp4byup_config.json’)
client = Client(auth)
service_account = client.user().get()
print(f’Service User Account id is {}')

Hello! :wave:

Unfortunately, in order to use the JWT auth type for an app, you will need to have a paid version of a Box Enterprise account with access to the admin console. We are currently working on creating a free developer enterprise account option for developers to use.

Alex, Box Developer Advocate :avocado: