V3 API Authentication with .Net C# project

SRTA
Participant

V3 API Authentication with .Net C# project

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

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.
API Support Specialist

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.
Developer Portal

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

Visit Page