Skip to main content
Question

Unable to get access using Box SDK when the authentication method is Client Credentials Grant

  • May 23, 2025
  • 2 replies
  • 43 views

Forum|alt.badge.img

Hi Team,

I create a Custom App and its authentication method is 
Client Credentials Grant. And It throws this error message while trying to access box using SDK.

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

The SDK 

BoxCCGAPIConnection api = BoxCCGAPIConnection.applicationServiceAccountConnection(
    "client_id",
    "client_secret",
    "enterprise_id"
);

 BoxCCGAPIConnection api = BoxCCGAPIConnection.userConnection(
                    "xxxx",
                    "xxx",
                    "xxxx"
            );
            BoxFolder root = BoxFolder.getRootFolder(api);

2 replies

Forum|alt.badge.img

Hi there, 

Welcome to Box Community and glad to help! 

I created a new ticket and a member of our team will keep in touch through email. Please keep an eye out. 

Thanks for posting! 


Forum|alt.badge.img

getting the same error on version 4.7.0.

Is there some workaround or other way to use

BoxCCGAPIConnection api = BoxCCGAPIConnection.userConnection(
                    "xxxx",
                    "xxx",
                    "xxxx"
            );