box / box-python-sdk

Box SDK for Python
http://opensource.box.com/box-python-sdk/
Apache License 2.0
413 stars 214 forks source link

Please check the 'sub' claim. The 'sub' specified is invalid #868

Closed jackey20200402 closed 4 months ago

jackey20200402 commented 4 months ago

The following error was sent when I used the following code for JWT authentication testing: from boxsdk import JWTAuth, Client

auth = JWTAuth.from_settings_file('/app/scripts/0_vbo9ncv9_config.json') client = Client(auth) service_account = client.user().get() print(f'Service Account user ID is {service_account.id}')

boxsdk.exception.BoxOAuthException: Message: Please check the 'sub' claim. The 'sub' specified is invalid. Status: 400

Versions Used

Python SDK: latest Python: Python 3.7.16