Hi community,
I am trying to achieve a simple function using .Net Core 3.1.
I set up my application, jwt, oauth and downloaded authentication json file and run to access other users files and folders. As advised, I enabled the Perform Actions as Users as well as Generate User Access Tokens.
The following is my code:
var adminToken = boxJWT.AdminToken();
var adminClient = boxJWT.AdminClient(adminToken);
var items = adminClient.FoldersManager.GetFolderItemsAsync("0", 500).Result; --> empty.
or
var userToken = boxJWT.UserToken("12345678"); --> Error
//error_description=Cannot obtain token based on the enterprise configuration for your app
I seems that I have to add http header for the user access, but I don't know how to do it.
Please advise.