I cannot get this module to work:
The code has not been changed and it's the latest version: See link for code.
But when I dig into what's being returned, the authentication is not going through, I am getting this returned via cURL:
But when I manually go to the URL and enter the username and password (which the module is generating correctly), I can login and get the XML.
Based on the error you're receiving, the authentication isn't even being set for the HTTP request. This leads me to believe that the username and password are not being properly passed through/set.
However, the Drupal module is developed by a third party, so my knowledge of its inner working is very limited. I would suggest verifying that the http_user and http_pass fields within that function are carrying the proper values. For the username, it should be in the format <APIKEY>%<USERNAME>, and the password should simply be your Constant Contact account password.
If you do have any additional questions or if you're still stuck, please feel free to post back here.
API Support Specialist
Yes the username and password are correct. When I echo them out, then use those values to manually go to the URL and login, everything works properly.
After doing more digging, it appears that all of the code is in order from inspection. In addition, if the username and password work properly, then there are only a few potential culrpits remaining.
You may need to check your PHP version/cURL version. It may also be possible that a drupal version could be causing a compatibility issue.
It may be an issue in the plugin's code that I was not able to see. Unfortunately this plugin is developed by a third party, so further testing and analysis would need to be performed by the developer to get this sorted out.
Lastly, it may matter what function of the module you are trying to use when this is failing, or if it is failing on every action that is performed.
If you are able to provide additional information about the error, I may be able to give you some additional insight. Unfortunately, this does appear to be an issue with the module and possibly a server configuration rather than an issue with the API as you are able to connect directly without an issue.
API Support Specialist
I was having a similar issue, and the answer ended up being that the password I had chosen had some special characters in it that seemed to be causing the errors. I switched to a simpler password using only letters and numbers, and it started working. YMMV, of course :-)