Enter the Share Your Success Sweepstakes 2024 For the Chance to Win Great Prizes!

V3 API Authentication with .Net C# project

SRTA
Rookie
0 Votes

I am attempting to prove out Constant Contact as a mass email solution for an application programmed in C# with the .Net framework. So far, I have been able to demonstrate all necessary functionality for authorization, contact list syncing, and email creation/sending in Postman. All of the API calls work perfect. However, once I attempted to implement the server flow authorization programmatically I ran into an issue of not receiving the JSON response content containing the auth token/refresh token. I receive an HttpResponseMessage with a 200 status, but it doesn't contain the tokens as expected. 

SRTA_0-1616439690651.png

 

Can you provide a demo using System.Net.Http.HttpClient to create a post request to get the auth and refresh tokens?

1 REPLY 1
Courtney_E
Moderator
0 Votes

Thank you for reaching out to Constant Contact API Developer Support, and for your patience. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

It looks like we've already followed up with you directly via email, but here is the information provided for visibility on the forum:
We don't currently have an example project available in C#, however we can certainly review your code if you provide us with a sample via email at webservices@constantcontact.com

 

You also mentioned that you've tested using Postman. Postman does include the ability to generate code snippets (https://learning.postman.com/docs/sending-requests/generate-code-snippets), which may be useful, although I see that uses RestSharp rather than HttpClient for C#.


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up