cancel
Showing results for 
Search instead for 
Did you mean: 
In recognition of Martin Luther King Day, our Support Centers will be open with limited hours on Monday (1/20) from 10AM ET to 6PM ET.
Visit our Help Center to see all of the ways you can find answers to your questions.

Sudden Issue...

Occasional Participant

Sudden Issue...

I have a newsletter sign-up set up on many websites which was working, but now it's broken. Here's one:


http://mymsuccess.com/


The requested URL returned error: 401

Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/mymsuccess.com/httpdocs/cc_class.php on line 60

Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/mymsuccess.com/httpdocs/cc_class.php on line 74


Looks like the 'doServerCall' function is returning an empty string?


Could this happen if the Constant Contact user login is disabled because there's been too many invalid attempted logins? (This is the case for the account currently)


Or is this some sudden change in the API?


 


Any help much appreciated,


Dorota


 


 


 

5 REPLIES 5
CTCT Employee

Yes, your form could display

Yes, your form could display an error message if it is unable to successfully connect due to numerous invalid login attempts. While the sample script that you have adapted for you signup form is a great starting point it does not have adequate error checking to avoid these types of messages from being displayed. There are a few options for resolving this both short-term and long-term. The first step would be to have your account unlocked from the login-failures and make sure that the credentials are correct in your integrations to avoid getting locked out again.


 


Your long term solutions would be to either disable verbose error messaging since the warning is non-fatal. Or write a line of logic that checks the contents of the array before attempting to iterate through it with a foreach loop.

Dan H

Support Engineer, Constant Contact

Occasional Participant

Hi, Thanks for your response.

Hi,


Thanks for your response. I put in some logic to remove the Warning signs and errors, although I don't mind them being there, as they are the only way we have to find out if stuff is broken.


I got my client to get his account reset to the correct credentials, but it has been locked again  -  it is possible that this code is causing it to get locked up in some way?

Occasional Participant

PS It still doesn't work.

PS It still doesn't work.

Highlighted
CTCT Employee

I am sorry to hear that the

I am sorry to hear that the account has been locked again. This could be caused by your script not having the correct credentials. Has someone recently changed the password on your account or is there another integration that has incorrect credentials?


 


Is this integration using an API key that is associated with its own account, or a an API Key from a different account?

Dan H

Support Engineer, Constant Contact

Occasional Participant

It seems that in this case

It seems that in this case the problem was indeed that I was locked out of the account again. It's possible my client keeps changing the username/password or locking it by providing the wrong credentials... but I'm not sure. It seems to happen a lot.