Skip to main content

I want to call [API:2.0/recent_items] by postman.

but error 403 is populated.

used token is ok. because I used the token to called [API: 2.0/files/id ] and successful response.

when use same the token to call [API:2.0/recent_items] ,it is error 403.

how to solve it ?

thanks.

Hi @user233 , welcome to the forum!


That is odd, and you are not providing much information to help diagnose the issue.


I can duplicate this by trying to guess, so here it goes.


The recent end point will only work if it has a user security context, as opposed to a service account, because only users have recent entries.


Consider an application setup as CCG, and using the enterprise id:



curl --location 'https://api.box.com/2.0/recent_items' \
--header 'Authorization: Bearer VK...JD'

I get a 403.


The same application using a user:



curl --location 'https://api.box.com/2.0/recent_items' \
--header 'Authorization: Bearer lg...JW'

Returns:


{
"next_marker": "",
"limit": 100,
"order": {
"by": "interacted_at",
"direction": "DESC"
},
"entries": [...many entries...]
}

Let us know if this helps


thanks a lot . you are right.


Reply