Invalid_grant - Grant credentials are invalid
Hi, I have created a "Custom APP" with "Server Authentication (Client Credentials Grant)". While using the SDK, I'm passing my client ID, client secret, and user id. Here is the code.
BoxCCGAPIConnection api = BoxCCGAPIConnection.userConnection(
"1z7s4rcl4gpjudynikjvrupgj9fmttgp",
"Client Secret",
"User ID"
);
BoxFolder rootFolder = BoxFolder.getRootFolder(api);
for (BoxItem.Info itemInfo : rootFolder) {
System.out.format("%s\n", itemInfo.getName());
Getting the following error while executing the code.
Exception in thread "main" com.box.sdk.BoxAPIResponseException: The API returned an error code [400] invalid_grant - Grant credentials are invalid
-
Thanks, Rui Barbosa.
-
Hello Rui Barbosa
Does this mean that we are unable to test any API connections when we're on free developer accounts?
I am getting the same issue with box_subject_type = user and box_subject_id = {userId}
{"error":"invalid_grant","error_description":"Grant credentials are invalid"}
Are there any updates on this?
Thanks -
Rui Barbosa, do you know when will this be back? I have a partner system using Box to drop files and I can't get to it using Box SDK.
-
In another word, I can only use CCG if I have a paid account, Rui Barbosa?
-
Hi Vince,
It depends, see this thread for details.
-
This is a legit business purpose and I can't provide details on the public forum. Is there a technical support system I can submit a ticket to? I can't use OAuth2 for a backend process. I can pay for the account, but I need to know if that will resolve the CCG blocking. Thanks, Rui Barbosa
-
Rui Barbosa, I upgraded mine to a paid account and the restrictions are still there. I can't use CCG. How do I contact technical support on my paid account? I do not see the menu or where I can contact. When I chose Contact Support, it brought me to Community Forum?!
-
Hi Vince,
It's not just a matter of being a paid account or not, only the higher enterprise tiers are allowed developer accounts for now.
However, let me suggest a few workarounds and let me know if they would work for you.
If you're running your app on a server you could try to use the developer token directly. This token is valid for 60 minutes and can be generated on the developer console.
Another option is to use the OAuth 2.0. If you start the process in your client machine and pre authorize the application, eventually you will end up with a pair of access and refresh tokens. These could be used on the server app and are sufficient to instantiate the Auth and Client classes of the SDK, renewals, etc.
My least favorite options is to use the 14 day enterprise trial aka Box Plus. Be sure to cancel the subscription before the trial expires, or you'll be charged.
None of this is ideal, and it is being dealt with, it's just going to take some time.
Best regards
サインインしてコメントを残してください。
コメント
11件のコメント