citrix / ShareFile-NET

C# library for accessing ShareFile V3 API
MIT License
36 stars 26 forks source link

FavoriteFolder is not working #21

Closed shahshyam closed 7 years ago

shahshyam commented 7 years ago

I am using your git repository code . I am pulling favorite folder from api but it does not give response. it throw exception.

My account detail :- company account code=

var account = sfClient.Accounts.Get(null).Execute(); var favoritefolderlist=sfClient.FavoriteFolders.GetByUser(account.url).Execute();

rgmills commented 7 years ago

Hi @shahshyam to fetch favorite folders for the current user, you'd do the following:

var user = sfClient.Users.Get().Execute();
var favoriteFolders = sfClient.FavoriteFolders.GetByUser(user.url).Execute();

The intended url should be that of the user not the account.

Hope this helps!

shahshyam commented 7 years ago

Thanks for your help. It is working .

bpw320 commented 2 months ago

get error: ShareFile.Api.Client.Exceptions.ODataException: 'Authorization failed: FavoriteService.Get'