2

Exception thrown: 'System.Net.Http.UnsupportedMediaTypeException' in System.Net.Http.Formatting.dll

Exception thrown: 'System.AggregateException' in mscorlib.dll

Dim serializer As New ManateeSerializer

TrelloConfiguration.Serializer = serializer
TrelloConfiguration.Deserializer = serializer
TrelloConfiguration.JsonFactory = New ManateeFactory()
TrelloConfiguration.RestClientProvider = New WebApiClientProvider()
TrelloAuthorization.Default.AppKey = "[My app key]"
TrelloAuthorization.Default.UserToken = "[my app secret]"

Dim boardId As String = "56425ef7de9eb12872b4a662"
Dim Board As New Board(boardId)
Console.WriteLine(Board)

This is my first step off into accessing Trello via the API so I'm sure I must be missing something important. App compiles fine, and as long as I don't reference the "Board" code executes with no errors.

I'm not real clear what the "boardId" should be? Got it of the JSON example from a card from the Trello API web site?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
DanSiDev
  • 41
  • 5

1 Answers1

2

I was able to solve this by including the following:

TrelloConfiguration.RestClientProvider = New RestSharpClientProvider()

It seems this line of code was missing in the example I copied.

Also for any newbies that end up finding this, my next question was how do I get a user token for use with the API. This answer got me going...

How to get a permanent user token for writes using the Trello API?

Community
  • 1
  • 1
DanSiDev
  • 41
  • 5
  • Thanks for using Manatee.Trello. I think the problem was that you don't have a token. In those cases, Trello replies with either plain text or HTML. – gregsdennis Nov 24 '15 at 02:20
  • Regarding the token question. See [their docs](http://developers.trello.com/authorize). – gregsdennis Nov 24 '15 at 02:21