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.

Problem add new contact sdk php

SOLVED
Go to solution
AdrianL196
Regular Participant

Problem add new contact sdk php

Fatal error: Uncaught exception 'Ctct\Exceptions\CtctException' with message 'Bad Request' in D:\Website\htdocs\_Test_Sites\site14\htdocs\includes\vendor\constantcontact\constantcontact\src\Ctct\Services\BaseService.php:97 Stack trace: #0 D:\Website\htdocs\_Test_Sites\site14\htdocs\includes\vendor\constantcontact\constantcontact\src\Ctct\Services\ContactService.php(131): Ctct\Services\BaseService->convertException(Object(GuzzleHttp\Exception\ClientException)) #1 D:\Website\htdocs\_Test_Sites\site14\htdocs\ClassDasCC.php(23): Ctct\Services\ContactService->addContact('8fc0ff02-7da1-4...', Object(Ctct\Components\Contacts\Contact)) #2 {main} thrown in D:\Website\htdocs\_Test_Sites\site14\htdocs\includes\vendor\constantcontact\constantcontact\src\Ctct\Services\BaseService.php on line 97

1 ACCEPTED SOLUTION
AdrianL196
Regular Participant

Thanks for the information, I am fixed the problem, the problem consist  same list name(create list) and this was  send this problem.

View solution in original post

2 REPLIES 2
Jimmy_D
Moderator

Hello @AdrianL196,

 

Based on the ContactService.php line it looks like it might be trying to add a contact using the incorrect ID. The other lines referencing BaseService.php line 97 are a bit odd since our normal SDK do not have a line 97 so I'm not sure what it might be referencing.

 

I would ensure that the code has not been altered, or if it has, that any additional code is correct. Attempt to add new contacts. If you still get the same errors then please reach out to us at webservices@constantcontact.com so we troubleshoot further.


Regards,
Jimmy D.
Tier II API Support Engineer
AdrianL196
Regular Participant

Thanks for the information, I am fixed the problem, the problem consist  same list name(create list) and this was  send this problem.

View solution in original post

Developer Portal

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

Visit Page