Skip to main content

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

  • August 31, 2023
  • 1 reply
  • 555 views

  • New Participant
  • 3 replies

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?

1 reply

rbarbosa Box
  • Developer Advocate
  • 553 replies
  • August 31, 2023

Hi @edztra


Welcome to the forum!


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




cheers


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings