Box.V2.Managers.BoxUsersManager.GetCurrentUserInformationAsync C# (CSharp) Method

GetCurrentUserInformationAsync() public method

Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated.
public GetCurrentUserInformationAsync ( List fields = null ) : Task
fields List Attribute(s) to include in the response.
return Task
        public async Task<BoxUser> GetCurrentUserInformationAsync(List<string> fields = null)
        {
            BoxRequest request = new BoxRequest(_config.UserEndpointUri, "me")
                .Param(ParamFields, fields);

            IBoxResponse<BoxUser> response = await ToResponseAsync<BoxUser>(request).ConfigureAwait(false);

            return response.ResponseObject;
        }