The ConstantContact class in the v2 .NET SDK appears to have 2 constructors:
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:
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?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am-8pm ET, Sat 10am-8pm ET, & Sun 10am-6pm ET. We've got real people waiting to help you out. Click below to start a conversation!