The ConstantContact class in the v2 .NET SDK appears to have 2 constructors:
public ConstantContact() public ConstantContact(string username, string password, string APIKey, string redirectURL)
With the empty constructor fetching values from the config file. I guess that's useful for single-user environments, but those appKey names are pretty generic and could easily collide with existing values. I think it'd be better to use a custom ConfigurationSection to keep them instead. Then you could have something in the config file like:
<constantContact username="" password="" apiKey="" redirectUrl="" />
The other constructor asks for the username and password. Since OAuth 2.0 is designed so that the user provides their username and password directly to the provider (Constant Contact) and not to the implementator, I won't know the username and password (nor should I).
How can I instantiate a ConstantContact instance using an access token instead of username and password?
I agree, we certainly should have included an option to include an access token instead of username/password. I have forwarded your points onto the appropriate people.
API Support Specialist