Skip to main content
Box Employee
May 23, 2025 11:39 AM UTC
Question

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

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

    Box Employee
    May 23, 2025 11:39 AM UTC

    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! 

    Translate
    Box Employee
    May 23, 2025 11:39 AM UTC

    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"
                );

     

    Translate