Metadata Permissions Error
I am using Oauth2 (User or Client Authentication) Postman Box Platform API collection to perform a POST /Query files/folders by metadata. The call is being made using the App userid as created by the Postman Box tutorial. I believed that only requirements were using Oauth2 or JWT. The response is coming back as insufficient permissions.-
{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"o50sxlgrcxzw7sh4"}
Right before this call, I successfully performed a GET List all metadata templates for enterprise. Here is the unsuccessful call-
curl --location --request POST 'https://api.box.com/2.0/folders/123456789' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--header 'Cookie: box_visitor_id=60b65e9ea626a3.00876970; site_preference=desktop' \
--data-raw '{
"from": "enterprise_123456789.someTemplate",
"query": "asset != :value",
"query_params": {
"value": ""
},
"fields": [
"metadata.enterprise_123456789.someTemplate.asset"
],
"ancestor_folder_id": "0",
"order_by": [
{
"field_key": "asset",
"direction": "asc"
}
],
"limit": 100
}'
-
Official comment
Hey Kerry,
This could be a few things.
Can you send me the client id of the application that you made in the developer console?
Also, I want to confirm... the code example you sent... is that exactly what you are running or did you put in placeholders for the different variables, like the template.
Thanks,
Alex, Box Developer Advocate
Comment actions
Please sign in to leave a comment.
Comments
1 comment