Not Authenticate
Good afternoon, I have the following problem.
When trying to obtain user information, it gives me the following message:
"Grant credentials are invalid"
I have an application with client credentials (server authentication)
I am using the Java SDK and the line of code I use to get the permission is:
BoxCCGAPIConnection api = BoxCCGAPIConnection.userConnection(CLIENT_ID, SECRET_CLIENT, USER_ID);
My CLIENT_ID is 0046s531alxnmszzy4wx2jdtn91s12a0
-
Alex, thank you very much for your answer.
I had to wait a few days for the app to be authorized in Box to try again. Finally today they have authorized it, the authentication occurs without error, however my new problem is that I cannot read the folders that I have in Box.
This is an extract of my code:
This line occurs without error:
BoxCCGAPIConnection api = BoxCCGAPIConnection.applicationServiceAccountConnection(ID_CLIENTE, SECRET_CLIENT, ENTERPRISE_ID);
However when I try to loop through the folders, this line gives me the result that I don't have any BoxItem.Info
for (BoxItem.Info itemInfo : folder) {
-
So, when you use CCA as the authentication type, a service account is automatically created... and that account has its own content - which since its new probably has no content. In order to see your users content, you would want to make an as-user call, which allows the app to impersonate your user account.
投稿コメントは受け付けていません。
コメント
5件のコメント