These are chat archives for gregsdennis/Manatee.Trello

Oct 2017
Oct 10 2017 16:37

I've been using Manatee.Trello to scan cards on our Trello boards for reporting purposes. However, this morning the scanning code which has worked for weeks stopped working. It appears to be giving an HttpRequestException: 'invalid token'.

Here is a short example which demonstrates the problem, based on the examples in the wiki page Manatee.Trello Usage. It is attempting to access the Welcome board.

using System;
using System.Diagnostics;
using Manatee.Trello;
using Manatee.Trello.ManateeJson;
using Manatee.Trello.WebApi;
using Manatee.Trello.Exceptions;

namespace MspUpdate
    class Program

        static void Main(string[] args)
            string BrdNm;
            Exception innerException = null;
            TrelloInteractionException te = new TrelloInteractionException(innerException);

            var serializer = new ManateeSerializer();
            TrelloConfiguration.Serializer = serializer;
            TrelloConfiguration.Deserializer = serializer;
            TrelloConfiguration.JsonFactory = new ManateeFactory();
            TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
            TrelloAuthorization.Default.AppKey = "MyAppKey";
            TrelloAuthorization.Default.UserToken = "MyUserToken";

            var board = new Board("7yuDFMwI");

Here are the details of the exception:

System.AggregateException occurred
Message=One or more errors occurred.
at Manatee.Trello.Internal.ExceptionHandling.DebugLog.Error(Exception e, Boolean shouldThrow)
at Manatee.Trello.Internal.DataAccess.JsonRepository.ValidateResponse(IRestRequest request)
at Manatee.Trello.Internal.DataAccess.JsonRepository.Execute[T](TrelloAuthorization auth, Endpoint endpoint, IDictionary`2 parameters)
at Manatee.Trello.Internal.Synchronization.BoardContext.GetData()
at Manatee.Trello.Internal.Synchronization.SynchronizationContext`1.Merge()
at Manatee.Trello.Internal.Synchronization.SynchronizationContext.Synchronize(Boolean force)
at Manatee.Trello.Board.ToString()
at System.Diagnostics.TraceListener.WriteLine(Object o)
at System.Diagnostics.TraceInternal.WriteLine(Object value)
at System.Diagnostics.Debug.WriteLine(Object value)
at MspUpdate.Program.Main(String[] args) in C:\Users\Bruce Pike Rice\Documents\Source\a2\JiraInteraction\Program.cs:line 33

Inner Exception 1:
HttpRequestException: Trello reported an error: 'invalid token'

Trello seems to have changed behavior recently. I wonder if something has changed in their api.

Thanks in advance for your attention.

Greg Dennis
Oct 10 2017 18:51
@BruceP99166 it looks like your API you has expired. Some times expire automatically, out you can set one up that never expires. If you originally set up an indefinite token, then Atlassian/Trello may have expired it on some kind of policy, but I don't that's the case. Regardless, you'll need to create a new token.
Here's Trello's site on authorization: You'll want to use the auth route
Oct 10 2017 21:10
@gregsdennis That did the trick. Thanks very much for your assistance. We find Manatee.Trello quite useful for extracting infomation from Trello for progress reporting.
Greg Dennis
Oct 10 2017 23:54
@BruceP99166 just got notification of your SO question. Go figure. Glad you found the room.