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
}'