C# Add Contact using API

DanielleN22
Participant

C# Add Contact using API

I have a C# console app that I want to use to bulk add contacts but I'm getting a bad request when I try to get access token (4th step of authentication using server flow) 

1 REPLY 1
Aarron_G
Moderator

Hello @DanielleN22,

 

Issues at this step in the flow are commonly due to either the authorization code having expired (it is valid for 60 seconds) or issues with the Authorization header.

 

To set up your Authorization header, you'll need both your app's client_id (which is your API key) and your client_secret. You would put these values in the following format: "client_id:client_secret", then convert that string to Base 64 encoding. The result is used in the Authorization header. An example would look like:

Authorization: Basic MjdlOPBkNjktUmQ4MY00MGUwLWVmZmYtODRjZjM2

 

If you're still experiencing issues after checking those two items, you can send us your code for review via email, at webservices@constantcontact.com.

 

Regards,


Aarron G.
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