We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

400 Error with clients credentials, OK with mine

SOLVED
Go to solution
BrittneyK7
Regular Participant

400 Error with clients credentials, OK with mine

simple_form.php - works great with my login and API, but when I swap out credentials to my clients login and API, I get a 400 error on the simple_form.php. 
Any guess would be totally appreciated.
Using uneditted (except for username, pw, and api key) PHP Sample Forms.
I have a personal trial account with Constant Contact to develop for clients. I have access to one of my clients accounts as well. 
No code difference between the two and no misspellings as the lists for each account are being fed correctly. 
Thanks for your time. Any guesses are greatly appreciated!
1 ACCEPTED SOLUTION
BrittneyK7
Regular Participant

Thanks for your time Ryan, 

 

I corrected the issue by uploading an untouched version to my webhost and not commenting out any form fields' code, only changing the redentials. 

 

Thanks again and sorry for the trouble 

View solution in original post

4 REPLIES 4
Ryan_D
Employee

Hey.

 

Is it just a 400 error or a 401 error.  The 401 error would represent a problem with credentials.  The 400 just means the data is just being built wrong.  Are you just submitting a contact using those forms?

Ryan Davis
Quality Engineer
BrittneyK7
Regular Participant

Hi Ryan, 

 

thanks for your time and reply. I've actually just submitted the code to one of your support staff. 

 

Yes, it's just 400. 

 

I am submitting the contact from those forms,  I placed the PHPSampleForms folder in the root of my domain name. 

 

I first took the two files cc_class and cc_simple_form (after stripping out everything but the email) and tested with those with the same response: 400 for the client and success for my account. 

 

Then I just uploaded the forms, straight from downloading them, onto my server. Changed the credentials, and tested there.

 

I did not look at the XML that was being created, though. 

 

Thanks,

Brittney 

Hey,

 

The only other thing that I could think of is that the List name does not exist in one account but the other.  That would cause a 400 error.

 

Please let me know if that is the cause. 

Ryan Davis
Quality Engineer
BrittneyK7
Regular Participant

Thanks for your time Ryan, 

 

I corrected the issue by uploading an untouched version to my webhost and not commenting out any form fields' code, only changing the redentials. 

 

Thanks again and sorry for the trouble 

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page