Welcome to the new Box Support website. Check out all the details here on what’s changed.

invalid_client - The client credentials are invalid

New post

Comments

5 comments

  • Alex Novotny

    Hello, 

    This could be a few things. It looks like you have access to file a support ticket - so I would recommend doing that. That's going to be the fastest way to get the answer. 

    Alex, Box Developer Advocate

    2
    Comment actions Permalink
  • spilafis

    API User, here's an example of how I did the authentication.

    I found that missing any of this params can cause the error you mentioned. And here I'm using the user id and enterprise id and everything from the app.
    I think the box documentation for the client secret auth incorrectly points at using UserTokenAsync instead of AdminTokenAsync and does not list the builder method SetEnterpriseId

    var boxConfig = new BoxConfigBuilder(boxClientID, boxClientSecret).SetEnterpriseId(boxEnterpriseID).Build();
    var boxCCG = new BoxCCGAuth(boxConfig);
    var tokenTask = boxCCG.AdminTokenAsync(); //valid for 60 minutes so should be cached and re-used
    tokenTask.Wait();
    var token = tokenTask.Result;
    var userClient = boxCCG.UserClient(token, boxUserID);
    2
    Comment actions Permalink
  • kushe

    spilafis You solution finally works. Wasted two days. I still face same issue in PostMan

    2
    Comment actions Permalink
  • spilafis

    @kushe, then upvote

    0
    Comment actions Permalink
  • Jackie Martinez

    Does anyone know the same workflow that spilafis wrote out, but for python (with the box SDK)?

    I've been stuck on this for some time!

    0
    Comment actions Permalink

Post is closed for comments.