Using an As-User Request in a Field

I tried to work with Box Enterprise API using As-User. I have an admin account that I used to try to retrieve content in a child account.

First, I used the administrator account to get the user ID of the child account. And he added the user ID as the "As-User: ########" field. However, I returned with the answer of 403.

Error message: "Request requires higher privileges than granted by access token."

I use the access token that was used to retrieve the list of users. Should I get a new access token using a new user? or is there an admin access token?

GET /2.0/folders/0/items HTTP/1.1\r
Host: api.box.com\r
Authorization: Bearer #######################\r
As-User: ########\r
Connection: close\r
\r

The access code is the same access code that is used to retrieve the user / user list

All checkboxes checked.

enter image description here

+4
source share
1 answer

Your application must be manually approved in the request box As-User. The documentation is mentioned , but easy to miss. To start the approval process, send a Box note and include your API key.

+2
source

Source: https://habr.com/ru/post/1622667/


All Articles