Trello.NET icon indicating copy to clipboard operation
Trello.NET copied to clipboard

trello.Boards.WithId throws an exception

Open epocaspt opened this issue 7 years ago • 1 comments

Hello,

The code below was working and now it throws an exception:

trello = new Trello(myTrelloAPIKey); trello.Authorize(myTrelloAuthorizationToken); currentBoard = trello.Boards.WithId(myTrelloBoardId);

The exception does not have a message and has the following stack trace: at TrelloNet.Internal.TrelloRestClient.ThrowIfRequestWasUnsuccessful(IRestRequest request, IRestResponse response) at TrelloNet.Internal.TrelloRestClient.Request[T](IRestRequest request) at TrelloNet.Internal.Boards.WithId(String boardId)

I've checked and a direct request to: https://api.trello.com/1/boards/<boardId>?key=<apiKey>&token=<authorizationToken> works as expected.

Can you help me?

Thanks in advance

epocaspt avatar Jun 09 '18 12:06 epocaspt

You must add this at the beginning:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

fagneralan avatar Jun 13 '18 19:06 fagneralan