Skip to main content
Question

Not able to get access token with OAuth 2.0 with Client Credentials Grant (Server Authentication)

  • May 27, 2025
  • 1 reply
  • 20 views

Forum|alt.badge.img

I have created custom app with OAuth 2.0 with Client Credentials Grant option and when i am trying to hit api to get access token i got "Grant credentials are invalid" Error. Currently I am using developer free account. Also I have checked my creds.

Request:

TOKEN_URL= "https://api.box.com/oauth2/token"

data = {
        "client_id": <client_id>,
        "client_secret": <client_secret>,
        "grant_type": "client_credentials",
        "box_subject_type": "user",
        "box_subject_id": "<user_id>"
    }
response = requests.post(TOKEN_URL, data=data)
 

1 reply

Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

Hi there, 

Welcome to Box Community and I'm here to help! 

We are thrilled to share that the all new Box Developer Community site is live! 

You may head over to forum.box.com to have our specialists to answer all your API related queries. 

Thanks for posting!