Skip to main content

I’m new to the Box API, and I’m trying (and failing) to get JWT Authetication working

I’ve created a Custom App in my free individual account which shows enterprise id 0 I downloaded the JSON file that was generated containing the app settings.


auth = JWTAuth.from_settings_file(‘0_i21yxr8x_config.json’)

auth.authenticate_instance()

client = Client(auth)


When I run my code I get an error


boxsdk.exception.BoxOAuthException:

Message: Please check the ‘sub’ claim. The ‘sub’ specified is invalid.

Status: 400

URL: https://api.box.com/oauth2/token

Method: POST


I read somewhere the “enterpriseID”: “0” in the json file might be causing this issue. How do I get a working enterprise ID? Or is there a way to use the User ID?

Hi @edztra


Welcome to the forum!


Please take a look at this post and see if any of the options work for you.




cheers


Reply