Grant credentials are invalid
I have created a Client Grant type application in our company Box application.
When trying to connect to it, I am getting following error:
curl -L -X POST "https://<companyboxurl>/oauth2/token"
-H "Content-Type: application/x-www-form-urlencoded"
--data-urlencode "client_id=<client_id>"
--data-urlencode "client_secret=<client_secret>"
--data-urlencode "grant_type=client_credentials"
--data-urlencode "box_subject_type=enterprise"
--data-urlencode "box_subject_id=<enterprise_id>"
On trying this, I am getting the below error:
{"error":"invalid_grant","error_description":"Grant credentials are invalid"}
Can you please let me know, what I might be missing.
My client_id is 8msnq7jz7xw38h297oewbjh4pqmcyffe
-
Hey Michael,
There is a bug I've reported to our engineering team that it looks like you've encountered. I can take care of this on the backend for you and get you up and running. Can you please tell me what the desired application access is for this application? You can take a look at the options in the configuration tab of the Developer Console: App Only or App + Enterprise.
Best,
Kourtney, Box Developer Advocate
-
I was able to get past the error above by clicking App + Enterprise and then requesting authorization of the app in the Dev console and granting in the Admin console.
However, when I get an access token and then request the items in a folder, e.g. 127335345385, I am receiving a 404 when I would expect the service account to be able to access this folder and its child items:
{
"type": "error",
"status": 404,
"code": "not_found",
"context_info": {
"errors": [
{
"reason": "invalid_parameter",
"name": "folder",
"message": "Invalid value 'd_127335345385'. 'folder' with value 'd_127335345385' not found"
}
]
},
"help_url": "http://developers.box.com/docs/#errors",
"message": "Not Found",
"request_id": "k3y05fgq2bqhdfnp"
}
投稿コメントは受け付けていません。
コメント
6件のコメント