Skip to main content

Hi there,

I cannot generate the token using the credentials grant. I can however use the temporary token from the portal to upload the file.

I am using the client credentials grant method mentioned in this URL: https://developer.box.com/guides/authentication/client-credentials/

I have double-checked the box_subject_type and box_subject_id along with client_id and client_secret. 

It used to work a couple of months ago. The error I first started noticing was 4th of October 2024. Can you please help me with this?

 

 

Hi Sabin

 

Are you user ‘enterprise’ or ‘user’ as the subject type? If you are using ‘user’ you need to make sure that the App access level is set appropriately. With ‘App access only’ you can only generate tokens for the service account and any app user created by the service account. if the user is a managed user you’d need Enterprise access as well. (remember to re authorize the app if you make any changes)
 

Rgds

Peter Christensen, Platform Solutions Engineer, Box


Thanks @pchristensen Box for the response.

 

I am currently using 

box_subject_type: user

grant_type: client_credentials

 

Below is my app access level.

 

And this option is ticked as well.

And I confirm it is a service account

 

 

I didn’t make any changes, but I have sent a request to reauthorise just in case.


Hi 

If your setting is ‘App access only’ you will not be able to generate tokens for managed users such as your own Box user. You would need to set it to App+enterprise (and re-authorize) to make this work. Also please note that if you change from ‘App access only’ to ‘App+enterprise’ you will need to re-enabled the advanced features for token generation as these are de-selected when you make the scope change. 

Rgds

Peter

 


Reply