Skip to main content

I am trying to create a Webhook V2 associated to a folder with the Box CLI (Powershell) but I return this error:

 

 

Unexpected API Response e403 Forbidden | wncdt6fz7hr7j3tk] access_denied_insufficient_permissions - Access denied - insufficient permission

I follow these steps:

 

 

1. Create a Custom App with OAuth 2.0 with JWT Authentication

2. Set Enterprise as Application Access.

3. Enable/Check all Application Scopes options.

4. Activate Perform Actions As Users and Generate User Access Token at Advanced Features.

5. Generate a Public/Private Keypair and download the JSON to set in my Box CLI.

6. Authorize the custom application using the Client ID  at Admin Console.

7. At Box CLI, create the environment with the JSON configuration downloaded at step 5. Set that environment as default.

8. Get the Token to use to create the Webhook with the following command:

box tokens:get --user-id $user_number

9. Create the Webhook:

box webhooks:create folder test_lab -T FILE.UPLOADED -a http://test-lab.us-e2.cloudhub.io/lab -t e66kxXI1MyGtXTs7888uy8hutPrreH9R

When I try to create it, returns the 403 Forbidden error.

 

 

 



Hi everuser!


 


In order to create V2 Webhooks, make sure that your application has the Manage Webhooks V2 scope enabled in it's configuration in the developer console. Once you have added this scope to the API key in the dev console and saved, you will need to reauthorize the application in the enterprise's admin settings so that the new scope is enabled. Once this is done you should be able to create webhooks with the command line. 




SOLVED: I've been using the file name in id field instead of the field number.




Hi - Just curious what CLI version are you using? I am running into an issue where I am not able to connect to Box using Box CLI 2.0. . 

 

I get the following error - tunneling socket could not be established, statusCode=408



Reply