Can't access enterprise events with enterprise JWT token
Using the boxr 1.4.0 Ruby SDK, I can get an enterprise auth token and make client request to get users, get files, download files etc. But requests for enterprise events fails with an insufficient_scope error.
Steps to Reproduce
# call Boxr::get_enterprise_token( ) with JWT credentials and successfully get access token $client = Boxr::Client.new(ACCESS_TOKEN, as_user: BOX_USER_ID) $client.enterprise_events(stream_position: next_stream_position, event_type: 'UPLOAD') # error happens
Error Message, Including Stack Trace
Traceback (most recent call last): 6: from /app/bin/get_events.rb:31:in `' 5: from /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/events.rb:13:in `enterprise_events' 4: from /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/events.rb:13:in `loop' 3: from /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/events.rb:14:in `block in enterprise_events' 2: from /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/events.rb:44:in `get_enterprise_events' 1: from /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/client.rb:104:in `get' /var/lib/gems/2.5.0/gems/boxr-1.4.0/lib/boxr/client.rb:239:in `check_response_status': 403: Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token." (Boxr::BoxrError) |
It is worth noting that our account is a Co-Admin. We have all the administrative privileges checked: Manage users, manage groups, view users' content, etc.
-
Hey ,
Thanks for posting to the forums! While your User ID is a co-admin, your application may not have the proper scopes to make calls to /events. You will need the "Manage Enterprise Properties" scope to make calls to /events - can you check your scopes in the App Configuration page from the Developer Console?
Make sure to reauthorize your application in the Admin Console after making any changes to scopes.
Thanks,
Jason
Please sign in to leave a comment.
Comments
1 comment