Hi Team ,
Am following the below steps :
- Used the service account to create a new app user .
- Got the user ID in the response
- Created an app user client using the ID from the above step
- Made the search api call using box-node-sdk . (
client.search.query(
'Test',
{
file_extensions: 'doc,docx,pptx',
limit: 200,
scope:'enterprise_content',
offset: 0,
},
function(err, res){
if(err){
console.log("error ",err);
return;
}
console.log(res);
}
);
5) When I set the scope as user_content getting zero results but no error . ( using app user client)
6) When I set the scope as enterprise_content ( which is the requirement ) Getting the following error:
{ type: 'error',
status: 403,
code: 'access_denied_insufficient_permissions',
help_url: 'http://developers.box.com/docs/#errors',
message: 'Access denied - insufficient permission',
request_id: 'flmcm6fo6ujhtwkk' } } }
Should I search using the service account client or app user client ? . In the docs it is mentioned that we need to make a call using app user client created by service account.
If I do a search using service account client , it is returning response as { total_count: 313631, entries: [], limit: 20, offset: 0 } . Here entries field is coming as empty.
Kindly help in resolving this and also let me know if any other info is required.