Webhook v2 - 403 Forbidden with Box CLI
AnsweredI am trying to create a Webhook V2 associated to a folder with the Box CLI (Powershell) but I return this error:
Unexpected API Response [403 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.
Please sign in to leave a comment.
Comments
3 comments