TrelloNet objects always returning null

161 Views Asked by At
ITrello trello = new Trello(AppKey);
trello.Authorize(Token);
Member me = trello.Members.Me();

for example, in this case it was to return my user but always return null, i want to know how to fix it. Thaks.

1

There are 1 best solutions below

2
Shiva On

Are you sure you are passing the correct AppKey string to the Trello constructor?

Per the documentation, you have to do it like so.

ITrello trello = new Trello("[your application key]");

Where [your application key] is the key string you get from https://trello.com/1/appKey/generate (need to be logged in to Trello before you access that url.

The token in your 2nd line is also a string, not a class.

trello.Authorize("[the token the user got]");

Source: Trello.net Wiki