Receiving access_denied_insufficient_permissions when creating a shared link
回答済みI'm trying to upload a file and create a shared link using a free Box developer account. The upload part works just fine. When I try to create a shared link I get an error response. A copy of the error response that I received is below.
{
"type":"error","
status":403,
"code":"access_denied_insufficient_permissions",
"help_url":"http:\/\/developers.box.com\/docs\/#errors",
"message":"Access denied - insufficient permission",
"request_id":"***number removed for privacy***459c813f50f924"
}
I received this error with code that I wrote myself and with code from some other SDKs and samples. I finally tried with the sample curl command that Box has posted (of course changing the file ID and the authorization key) and receive the same response. For the sake of testing I've enabled all of the application scopes but still get this error. What is the cause of this and how do I resolve it?
-
Hi ,
Can you confirm which user account / type owns the content you uploaded (i.e. if uploaded programatically did you use standard
OAuth 2.0 for authentication or JWT service account?
It could be that the user you are now trying to use to generate the shared link simply does not have access to the file.
You can test this by logging into the Web UI as the same user and trying to generate the shared link using the "Share" button.
Let me know how you get on with this?
Peter
-
I created one of the developer tokens that works for 60 minutes against my own account. So the place to which the files were uploaded and the developer token are associated with the same account.
The other settings I've selected are as follows.
Authentication Method: OAuth 2 with JWT
Application Access: Enterprise
Application Scopes: I checked all of them in trying to get through this problem
Advanced Features::Perform Actions as User: Enabled
Advanced Features::Generate User Access Tokens: Enabled
I **can** create shared links using this same user account manually (ex: https://app.box.com/s/x5ovgol71bjqww8nzm624b58cuuqwfvs ).
サインインしてコメントを残してください。
コメント
2件のコメント