Skip to main content

Api.box.com : Error "Grant credentials are invalid"

  • September 28, 2023
  • 2 replies
  • 290 views

I created personal Box account and am attempting to request a token using the client ID and secret. I am getting the following error.


{“error”:“invalid_grant”,“error_description”:“Grant credentials are invalid”}


Here are my application settings and requests:


App access level : App + Enterprise access

Authentication method: Server Authentication (Client Credentials Grant)


curl -X POST https://api.box.com/oauth2/token

-d “grant_type=client_credentials”

-d “client_id=redacted”

-d “client_secret=redacted”

-d “box_subject_type=user”

-d “box_subject_id=redacted”


I am providing the user_id of my Box account as the box_subject_id.

2 replies

smartoneinok Box
Forum|alt.badge.img
  • Senior Developer Advocate
  • 181 replies
  • September 29, 2023

Hello 👋,


May I have the client id of the application? Also - when you say “personal” Box account - do you mean like a free account? If so, you would need to have access to the Admin Console/paid business and above account in order to use CCG applications.


Thanks,

Alex, Box Developer Advocate 🥑


  • Author
  • New Participant
  • 1 reply
  • September 29, 2023

My client id is 3m9ft38gi9hc0z7ivn2z5qm6l07mnuhr.


It is a free account using my personal email address. It would be great if you could kindly grant temporary authorization for API testing purposes only. This is necessary since our company-provided enterprise account does not permit testing activities.


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