Unable to configure BOX CLI with OAuth 2.0 Error

Hi Everyone,

I am configuring the Box App and setting up the BOX CLI.
After executing the login command and entering the client ID and client secret,and granting access,I am redirected,and the following message appears:

(node:7544) UnhandledPromiseRejectionWarning: BoxCLIError: Error: Unexpected API Response [403 Forbidden]
at C:\Program Files (x86)@boxcli\client\src\commands\login.js:122:11
(Use node --trace-warnings ... to show where the warning was created)
(node:7544) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v21.2.0 Documentation). (rejection id: 1)
(node:7544) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The network I’m using is an environment where the company’s SSL certificate needs to be installed on each workstation.
The certificate has been set up.I have successfully configured it using the same procedure before.The error is occurring only this time.

Box CLI Version 3.7.0 win32-x86 node-v14.19.3

could you help?

thanks in advance

Hello Koji Ono,

I’m sorry you’re experiencing this issue with Box CLI. Here’s a concise guide to troubleshoot the problem:

OAuth Permissions: Ensure your OAuth2.0 credentials are correct and that they have the required scopes. Verify in the Box Developer Console.

Network & SSL Certificates:

Confirm the company’s SSL certificate is properly installed on your current workstation.
If possible, test outside your company’s network to check for network restrictions.
Box CLI Update: Consider updating to the latest version of the Box CLI for potential bug fixes.

Node.js Version: While Node v14.19.3 is typically compatible, consider updating Node.js to the latest LTS version.

Re-authenticate: Log out and re-authenticate with the Box CLI.

If the issue remains, please let us know.

Kind regards,