So I have been trying to authenticate the Box app with the Python SDK using JWT, but I am getting an error.
“BoxOAuthException:
Message: Please check the ‘sub’ claim. The ‘sub’ specified is invalid.
Status: 400
URL: https://api.box.com/oauth2/token
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 {service_account.id}')