Skip to main content
Question

com.box.sdk.BoxAPIResponseException: The API returned an error code [400] unauthorized_client - The "box_subject_type" value is unauthorized for this client_id

  • May 23, 2025
  • 1 reply
  • 145 views

Forum|alt.badge.img

Hi Team,

In JAVA project getting error while using below code(JWT with SDKs) :

BoxCCGAPIConnection client = BoxCCGAPIConnection.applicationServiceAccountConnection(

    "cd0h41a9vqhs77iin",

    "LyxAssyOyr8YDlK3Ey6",

    "428889"

    );

ERROR:

 The API returned an error code [400] unauthorized_client - The "box_subject_type" value is unauthorized for this client_id

can anybody help on this.

1 reply

Forum|alt.badge.img

Hello, 

As shown in the Java SDK examples, using applicationServiceAccountConnection accepts a client id, client secret, and enterprise id. You will also want to make sure the admin of the enterprise has authorized the application

Thanks, 

Alex, Box Developer Advocate