Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

API error - Grant credentials are invalid

New post

Comments

1 comment

  • VI Web Portal

    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":[],"token_type":"bearer"}

    0
    Comment actions Permalink

Please sign in to leave a comment.