We are using the sample PHP code provided by CC on their site, and of the 3 sample codes we've tried,. all have failed to communicate with CC, returning authorization failures. (401 and the like). When we copy and paste the address that the source code is trying to reach, into our browser, we are prompted for a username and password. We provide the same username and password that we are use to log into our account on CC, but the prompt fails to accept it.
We tried the sample code with the CC_Utility class, the class ConstantContact_Contact and class ConstantContact.
The ConstantContact class couldn't even get past the CTCTDataStore check.
Can someone please help us make the connection?
I'd like to know specifically which pieces of sample code you are using, as well as when you started to develop with us. Within the last few weeks, we have moved our API key generator to our V2 API, and these new keys will not work with the V1 endpoints. Also, we have updated our sample code to include the V2 API, and these samples no longer use the CC_Utility class.
Also, when you access one of the endpoints for v1 (example: /ws/customers/username/contacts), to log in via the browser, the format must be as below, but will only work if you have a V1 API key.
user: apikey%username password: password
I would suggest taking a look at our new sample code page or any of our V2 wrappers in our Github repo if you are just getting started. If you started development in our V1 API before we launched V2 earlier this month, we can definitely still help you with the V1 code and calls. If so, just send an email to email@example.com with the code you are using, including your changes for authentication, and we can take a look at what is preventing authentication.