Skip to main content

Hi,


I am getting this error when when I am trying to generate access token using the credentials.


{"error":"invalid_grant","error_description":"Grant credentials are invalid"} 


Client id:n3zymfu33bllosrhesubgotmdk7wei27


box_subject_id: 25900613592


box_subject_type: user


grant_type: client_credentials


App Access Level is set to App Access Only.


 


Can anyone please look into this?


Thanks,


LG

I got the same "invalid_grant" error.  However, using "enterprise" type as below:


curl -i -X POST "https://api.box.com/oauth2/token" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "client_id=***" \
     -d "client_secret=***" \
     -d "grant_type=client_credentials" \
     -d "box_subject_type=enterprise"  \
     -d "box_subject_id=account_enterprise_id_here"


I did get back a token:


{"access_token":"***","expires_in":3708,"restricted_to":7],"token_type":"bearer"}


Reply