新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Error: Grant credentials are invalid

新規投稿

コメント

55件のコメント

  • Kourtney

    Hello, 

    Could you please provide the client ID of your application so I can take a look at it in the backend? I believe you may be affected by a known bug. 

    Best,

    Kourtney, Box Developer Advocate

    0
    コメントアクション パーマリンク
  • Rathin Mandal

    Hi Kourtney,

    Thank you for replying.

    Here is the client Id: pult3u3k5hfw0h22o1azb01jh0oi9qxc

    I am trying my test on Sandbox environment of Box.

    0
    コメントアクション パーマリンク
  • Kourtney

    Hey Rathin, 

    Thank you for providing that information! It does appear this is the bug at work, but I can quickly help you work around it. Can you please tell me what the desired application access is for this app (i.e. app only or app + enterprise)? 

    Best,

    Kourtney, Box Developer Advocate

    0
    コメントアクション パーマリンク
  • Rathin Mandal

    Hi Kourtney,

    Thanks for quick response.

    I am building a backend application, which will be uploading some files to box folders using BOX API. The application will have no access to website or redirect url.

    So achieve this, I am trying the option of client grant, using client id and client secret.

    0
    コメントアクション パーマリンク
  • Jamie Thompson

    Hi Rathin,

    I stumbled upon this issue while researching something for another. What kind of app did you initially set up? Did you do the limited access app or the full enterprise app?

    Jamie

    0
    コメントアクション パーマリンク
  • Kourtney

    Hey Rathin, 

    Apologies my question was not clear enough-- which option under the configuration tab did you want set for the application access? The options are either app only or app + enterprise. The bug is affecting the selection not being flagged on the backend which is why you are getting this error. 

    Best,

    Kourtney

    0
    コメントアクション パーマリンク
  • Rathin Mandal

    Thanks for replying.

    @Kourtney, I am using App Only setting.

    @Jamie, I have selected Custom App and then Server Authentication

    0
    コメントアクション パーマリンク
  • Kourtney

    Thank you --- go ahead and try to authenticate now! Things should be working. 

    0
    コメントアクション パーマリンク
  • Eric Gordon

    Hi - I'm having this same issue. How was this resolved?

    0
    コメントアクション パーマリンク
  • Kourtney

    Hey Eric -- Can you please provide me with your application's client ID and which option under the configuration tab you want set for the application access. The options are either app only or app + enterprise.

    Best,

    Kourtney, Box Developer Advocate

    0
    コメントアクション パーマリンク
  • Eric Gordon

    @Kourtney - Client ID: c91l0lqu7q0c3vdn8gtjxp8serrdo91k and configuration is app access only. Thanks.

    0
    コメントアクション パーマリンク
  • Rathin Mandal

    Hi Kourtney,

    I am able to access the API successfully. My Box application was not approved by Admin, due to which authorization was failing.

    Thanks for looking into this.

    0
    コメントアクション パーマリンク
  • N'DIAYE Ousmane

    Hi,
    I have the same problem, what is the source of the problem and how could I fix it?

    We selected custom app with server authentifcation(client credentials) and app access only. 

    Thanks,

     

    0
    コメントアクション パーマリンク
  • Kourtney

    Hello @N'Diaye Ousmane: 

    Apologies for the delay. Your application should now be able to be used. Please reauthorize the app in the admin console and try again! 

    0
    コメントアクション パーマリンク
  • Steven Oakes

    Hi Kourtney,

    Having the same issue.

    Auth Method: OAuth 2.0 w/ JWT

    Client_ID: ev07ia8ox3986pabq74vt8cft35pzdt0

    App Access Level: App + Enterprise Access

    0
    コメントアクション パーマリンク
  • Kourtney

    Hey Stephen, 

    If you want to use client id + client secret to authenticate you will need to make another app with the auth method as server authentication (with client credentials grant). This will not work with the current setup! 

    Best,

    Kourtney

    0
    コメントアクション パーマリンク
  • Hirosuke NAMBA

    Hi Kourtney,

    I have the same problem on my sandbox environment.
    How can I fix it?
    client_id: t90sdo91qdb4dc81tw36ujr4eq5bmgy8

    Thank you,

    0
    コメントアクション パーマリンク
  • Kourtney

    Hello @Hirosuke,

    Happy to help you out here. Can you please tell me what you tried to select for application access in the Developer Console?  The options are app only access or app + enterprise access? 

    Best,

    Kourtney

    0
    コメントアクション パーマリンク
  • Hirosuke NAMBA

    Hello Kourtney,

    Thank you for your quick reply.
    I selected "App Access Only".

    0
    コメントアクション パーマリンク
  • Arturo Ordonez

    Hello @Kourtney. I set the initial configuration to OAuth 2.0 with Client Credentials Grant (Server Authentication)

    My app's clientId is: o0dlrw040lfrmz8d9jv3kcoa77xdzuex. I have set the application access to App + Enterprise Access. I hope that's everything you need. Thank you!

    0
    コメントアクション パーマリンク
  • Ruben Ramirez

    Hello @Kourtney. My initial configuration is the Client Credentials Grant (Server Authentification) 

     

    My app's client id is kzd2wtczdmn178kdgsqfvgvmqve006qr and I have the App + Enterprise Access. Can you please enable permission. I keep receiving the "Grant credentials are invalid"

    0
    コメントアクション パーマリンク
  • Arturo Ordonez

    I was able to get this working using the Authorization Code flow, but when I try using Client Credentials, I'm able to get an access token but using it results in a 404 Error. Do I need to request enterprise access even though my workplace has an enterprise account? I ask because if I were to try and use a console application to ultimately do what we need, my best bet is likely to convert my Authorization Code function into a web service the Console application can call in order to successfully make an API call itself.

    0
    コメントアクション パーマリンク
  • Kourtney

    @Hirosuke: Thank you for confirming! Please reauthorize your app in the admin console and try again now. 

    @Ruben: This is already selected appropriately on the backend so there seems to be another issue with your request. Can you please confirm that the client id and client secret you're sending are correct and associated with the same application? 

    @Arturo: This authentication type will obtain a token for the application's service account. A 404 indicates that the user associated with your access token does not have access to the content you're trying to call. If you're not sure who your access token is associated with you can use the get current user endpoint. You will either need to obtain an access token for a user that already has access to the content or collaborate in your service account to the content. 

    0
    コメントアクション パーマリンク
  • Namrata Dhage

    Hi, I am getting this issue {"error":"invalid_client","error_description":"The client credentials are invalid"}, after passing the correct credentials

    Could you please take a look...

    0
    コメントアクション パーマリンク
  • Kourtney

    Hello @namrata: 

    Can you please provide the client ID of your application and what you tried to select for application access in the Developer Console?  The options are app only access or app + enterprise access. 

    0
    コメントアクション パーマリンク
  • Namrata Dhage

    Hi, this is my client id -> 6jb3em8cpjb932pv33kshv9k0mabr91b

    I have selected Custom App and then User Authentication (OAuth 2.0)

    0
    コメントアクション パーマリンク
  • Box User

    Hi, I am also facing this problem. I have set my app to App + Enterprise. My client id is

    de2e3ki0d9exfnk9tcppnnyjokbc5ole
     
    Thank you in advance
    0
    コメントアクション パーマリンク
  • Kourtney

    @Namrata: If you would like to use a, client credentials grant as shown in the first post of this thread, you will need to create an app with the auth type JWT with client credentials grant. Otherwise, the only way the invalid_credentials error can surface in OAuth 2 is if the email and password combination entered is invalid. 

    @Box User: Your application does not look affected by the bug in question. I'd start by verifying that the client ID and secret are both correct and for the same application. 

    0
    コメントアクション パーマリンク
  • Sami Luqman

    Hi, is there a fix for this issue? I am still having this problem

    client id: cv90ekrffk0ifdaibsmdnvc9sn246op7

    access level: App access only

    0
    コメントアクション パーマリンク
  • dev

    Hi @Kourtney, can you see if this is why I am getting the same error as the original poster?

    My client_id is till47pexrcgp9hpmk5js033ovqfy8uc and my access level is app+enterprise.

    1
    コメントアクション パーマリンク

サインインしてコメントを残してください。