Thank you for reaching out to Constant Contact API Developer Support.
Unfortunately we do not have any SDK libraries for our new V3 API at this time. Right now all of our focus is on finishing additional endpoints to expand on the feature set of the V3 API. You can find our complete V3 API documentation at https://v3.developer.constantcontact.com/ and the API Reference section will have all of the necessary schemas you can expect. You can make calls to our API in .NET using something like HttpClient with the information showing in our documentation.
Please let me know if you have any other questions!
Tier II API Support Engineer
Constant Contact -- you really need a .net library for this. For many of us, OAuth is insanely confusing and seems like a really odd choice for an API that is mostly used for internal tools (like uploading lists to Contact Contact) rather than a user-facing system. It's great for Facebook but weird and unnecessarily complex for making IT-class apps. For example, we use .net and we simply want a way to create lists and then bulk-add from CSV files. Easy, right? Is it possible to get a .net example, soup to nuts, for something like this where the app we're making an NOT a web app but simply a desktop app (WinForms or even Console is fine). It needs to clearly show, just using native .net objects, how to authenticate (including getting an activation code) then calling the Create List and then Bulk Upload calls. This really should be just a few lines of code.
Hey SteveP. Did you ever get any response/feedback from CC on this? Maybe it is just me....but they appear to totally clam up when queried about anything .NET related. Especially when it involves a desktop/windows application.
Anyways....i wonder if you( or anybody ) have had success establishing the OAuth2.0 Server Flow? I can get as far as the CC "Allow/Don't Allow" page...but nothing comes back to my app when clicking "Allow". It doesn't navigate to my redirect, just stay on "Allow/Don't Allow".. This is in a .Net windows app using the webBrowser control.
What is your use case? I am fighting the API to run "unattended" batch processes. If yours is similar, I've gotten to the point where I can get an access token and create a list. But it requires I include a manual step to pull the code from the redirect url in order to get the access token.
If you are using the Server Flow and are able to obtain the Authorization Code, maybe you can message me your email and we can discuss via email?
I don’t remember if I used server flow or what. I found the whole thing insanely confusing. I just know my code works as I used it about 20 times for doing Black Friday email blasts. One thing – you do NEED a public web server to get the code that CC sends back – ONCE! From there, you don’t need any web server and you can run things from a desktop app totally automated.
See my .aspx code for how to capture the first auth code. There is no need for a webcontrol.
"you do NEED a public web server to get the code that CC sends back"
Not necessarily. I used https://localhost as my redirectURL. It sends back the URL that I then paste into my browser. It attempts to redirect to the localhost URL and fails (page cannot be found), but shows you the auth code in the "failing" URL
No, no help whatsoever from them about this. But I did get something working. In essence, you have to manually trigger the Auth ONCE then use a web page to capture the authentication code (once) then use that code in your desktop app where the desktop app uses that code OR the "refresh" token. In fact, you only use the original token once then, from there on, you simply use the last refresh token.
(note: the code below was modified by the CC post tool so HTML references may not be quite right)
In other words, the work flow is:
Write a one-time-use web page to capture the auth code response and store it somewhere, like in a DB.
Trigger an AUTH call manually via a web browser. That calls the web page you wrote above and stores the original auth token.
Then, and you only have a few seconds to do this before the token expires, run a desktop app that reads the auth token and logins in. This causes the system to send you back a Refresh token.
Once you have a refresh token, you're golden because you can login from the desktop with that. Doing so provides a new refresh token for next use.
Some code, not all of which is relevant or complete but you'll get the idea.
ASPX page to capture the original auth and store it in a DB:
very nice....thank you! i'm aware that i can also use Postman to get Authorization Code and then the Access and Refresh tokens. And i would be fine doing it that way. But the integration to CC is part of our software. So, any number of our Users will have to go through the process to grant our app access to their CC accounts. Thus the need for the more 'traditional' UI. Or maybe i am missing something? Thanks again.
Basically what puzzles me is this: if i use the Client Flow, clicking "Allow" redirects to our page and the URL has the Access Token embedded in it. But, using the Server Flow, the redirect doesn't occur. So we cannot get the Auth Code. And they tell me it is a browser issue. But in one instance it works. In the other it does not.
View API documentation, code samples, get your API key.