403 Forbidden Calling Enterprise Events - Mayeb It's Account Type?
I'm trying to call the Enterprise Events from the API. Other calls seem to work, but for this one I get a 403 Forbidden (see below). I suspect either I'm getting the stream_position all wrong (I've tried a multitude of values here) or maybe my development account doesn't have "enterprise" features. I don't know how to validate the latter. Of course, maybe I'm way off and have no idea what's wrong. Looking for pointers on how to diagnose. Thanks for any help.
PS C:\Windows\system32> Invoke-RestMethod -Uri "https://api.box.com/2.0/folders/0" -Method "GET" -Headers @{"Authorizati on"="Bearer "} type : folder id : 0 sequence_id : etag : name : All Files created_at : modified_at : description : size : 3082536 path_collection : @{total_count=0; entries=System.Object[]} created_by : @{type=user; id=; name=; login=} modified_by : @{type=user; id=***number removed for privacy***; name=STEALTHbits Technologies; login=***email address removed for privacy***} trashed_at : purged_at : content_created_at : content_modified_at : owned_by : @{type=user; id=***number removed for privacy***; name=STEALTHbits Technologies; login=***email address removed for privacy***} shared_link : folder_upload_email : parent : item_status : active item_collection : @{total_count=16; entries=System.Object[]; offset=0; limit=100; order=System.Object[]} PS C:\Windows\system32> Invoke-RestMethod -Uri "https://api.box.com/2.0/events?stream_type=admin_logs&limit=3&stream_pos ition=0" -Method "GET" -Headers @{"Authorization"="Bearer "} Invoke-RestMethod : The remote server returned an error: (403) Forbidden. At line:1 char:1 + Invoke-RestMethod -Uri "https://api.box.com/2.0/events?stream_type=admin_logs&li ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Please sign in to leave a comment.
Comments
0 comments