We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Error getting Clicks

ConnieK21
Regular Participant

Error getting Clicks

I am using the API v2 c#. I am getting an error when using this function:

 

lst = _constantContact.GetCampaignTrackingClicks(campaignID, 500, createdSince);

Other campaign tracking functions that are similar seem to work properly except for this one. It seems to be rejecting the campaign id.

 

There was an error deserializing the object of type CTCT.Components.ResultSet`1[[CTCT.Components.Tracking.ClickActivity, CTCT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. The value '1114610711938' cannot be parsed as the type 'Int32'.

 

4 REPLIES 4
AndrewB776
Member

Hello,

 

Thanks for posting.  The campaignID is stored as a string, so trying to cast such a large number into that type is probably causing the problem.  Best keep the campaignID as a string.  I hope this answers your question.

 

Andrew B.

Constant Contact

API Support

ConnieK21
Regular Participant

Actually, I didn't cast anything. It seems that the dll is doing that. I sent c.ID where c is a CTCT.Components.EmailCampaigns.EmailCampaign. It works in these functions:

 

GetCampaignTrackingSends

GetCampaignTrackingForwards

GetCampaignTrackingOpens

GetCampaignTrackingBounces

GetCampaignTrackingOptOuts

 

They all work fine. Sending the same c.ID errors only on:

 

GetCampaignTrackingClicks

I saw your email that you sent in yesterday and our API support team is working on a bug fix for this in the wrapper library.  You're completely correct, not anything you're doing and it is a bug in the wrapper (we have a type missmatch in one of our classes).  Will get this fixed soon and check the fix into Github.

Dave Berard
Senior Product Manager, Constant Contact
ConnieK21
Regular Participant

You guys are awesome. Thanks!

Developer Portal

View API documentation, code samples, get your API key.

Visit Page