You are correct that the Access Token is to be provided when you are creating an instance of the ConstantContact class. If you are receiving a 401 error, that indicates that the API is not receiving a valid Access Token and is not able to grant you access. It is important to note that an Access Token should be generated for each combination of an API key and Constant Contact account.
The easiest way to generate an Access Token for use with a Constant Contact account is to navigate to https://constantcontact.mashery.com/io-docs, fill in your API key, and click on Get Access Token. You will be able to select "I already have an account" and log in to the desired Constant Contact account. Once you grant access to your application, you will be given an access token for that account.
If there is any additional information that I can provide, please let me know!
... View more