Search code examples
manatee.trello

Trello Manatee: Not Logged In


I am trying to list the boards in my organisation with this code:

        var serializer = new ManateeSerializer();
        TrelloConfiguration.Serializer = serializer;
        TrelloConfiguration.Deserializer = serializer;
        TrelloConfiguration.JsonFactory = new ManateeFactory();
        TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
        TrelloAuthorization.Default.AppKey = "<placeholder for my key>";

        public IEnumerable<Board> GetBoards()
        {
            return new Search(SearchFor.IsOpen(), modelTypes: SearchModelType.Boards).Boards;
        }

When I call GetBoards(), I get this error:

{"Trello reported an error: 'not logged in'"}

Solution

  • Figured it out, missing this line:

    TrelloAuthorization.Default.UserToken = <UserToken>;