Skip to main content
Question

Error with Grant credentials

  • May 22, 2025
  • 4 replies
  • 15 views

Forum|alt.badge.img

Hi there team, 

 

I'm working on an app that reads and writes folders to box. I've been able to successfully run the app with the developer token, but now that I'm attempting to generate access token I've run into the following error when calling: https://api.box.com/oauth2/token/

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

 

I saw a post that this may have to do with backend access level not set. I just need app level access. 

 

here is a screenshot of my request datapoints:

BOX1_AlRpw2xID1zg-C1cki0xeg.png

Client ID: nvnq8tgmcyjmdt9du6fwbucenaxo8bri

  •  

4 replies

Forum|alt.badge.img

1 comment I will make is this app is authorized. 


Forum|alt.badge.img

Hey Andrew - Things look ok on the backend for this client ID. It looks like in your screenshot you're passing an email address as the value of box_subject_id. Instead you need to pass the user ID of your AutomationUser. 

Kourtney, Box Developer Advocate


Forum|alt.badge.img

Thanks Kourtney for the help, 

I've changed the box_subject_id to what I believe is the id of the automation user: 1564667 

looking at the API to list enterprise users that automation user is not present in that list... So I then also tried using the admin user id as the box_subject_id and it still is giving me same error

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


Forum|alt.badge.img

Nevermind, I was able to find the enterprise ID I need to use under the 'App Info'