cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

Adding multiple contacts in the contact List

SOLVED
Occasional Advisor

Re: Adding multiple contacts in the contact List

Hi shannon,

 

without "basic" it's not working for me.

So it's ok campaigns are showing with OAuth 2.

 

But if i try to add bulk contacts through my code. I followed the steps you mentioned but not able to insert data. It gives following error.

HTTP Status 401 - Invalid signature for signature method HMAC-SHA1

 

when it print $this->CTCTRequest in code it gives blank signature object.  like this

 

CTCTRequest Object
(
[baseUri] => https://api.constantcontact.com
[username] => ***Correct username***
[apiKey] => ***Correct key***
[authType] => oauth
[requestLogin] =>
[consumerSecret] =>
[consumer] => OAuthConsumer Object
(
[key] => ***Correct key***
[secret] => ***Correct secret***
)

[accessToken] =>
[signatureMethod] => OAuthSignatureMethod_HMAC_SHA1 Object
(
)

)

 

Can you help me, where I am missing code.

 

Code which I executed is:

 

the string which is showed in display is:

activityType=SV_ADD&data=Email+Address%0A+shiv.jangid%40directive.com&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2F{username}%2Flists%2F2

 

But it's not working correctly. hope you got my issue???

Occasional Advisor

Re: Adding multiple contacts in the contact List

https://api.constantcontact.com/ws/customers/{username}/activities?oauth_consumer_key={key}&oauth_no...

 

this is the url which m getting. some values in the url are altered. but their syntex is same. this is what m getting while execution so where the issue. if this will help you.

And also $method=POST

CTCT Employee

Re: Adding multiple contacts in the contact List

Hi,

 

It looks like you have an extra "+" before the email address in the string you are sending to us.  Can you change the string to the string below (with your username put in) and see if that works?

 

activityType=SV_ADD&data=Email+Address%0Ashiv.jangid%40directive.com&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2F{username}%2Flists%2F2

 

Let me know if that works.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: Adding multiple contacts in the contact List

No it's not working.I already checked it.

CTCT Employee

Re: Adding multiple contacts in the contact List

Hi,

I can successfully POST the following URL to my account, replacing my username and posting to list 1 (since I deleted list 2):

 

activityType=SV_ADD&data=Email+Address%0Ashiv.jangid%40directive.com&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2Fusername%2Flists%2F1

 

I am using the details below for the header information. Content-type: application/x-www-form-urlencoded

 

What information are you trying to pass in using the signatureMethod object?

 

Best Regards,
Shannon W.
API Support Specialist

Occasional Advisor

Re: Adding multiple contacts in the contact List

hi,

 

m not aware of signatureMethod object and how to pass this value and in which function we have to pass.

 

error m getting while updating bulk contacts is 

 

HTTP Status 401 - Invalid signature for signature method HMAC-SHA1

 

Why this error is there only needs how we can sort this out.

I am sending you code on webservices@constantcontact.com this email id.

 

 

CTCT Employee

Re: Adding multiple contacts in the contact List

Hi,

 

I am looking into what may be causing this issue--both your code and our wrapper, and I will respond to you via email when I have more details.  Thanks!

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: Adding multiple contacts in the contact List

hi Shannon, 

 

Are you able to find out any solution for that???

if there any wrapper update or something please let me know. we need it urgently.

because there is no alternate method in these wrapper. other than we have to use cc_class methods

Highlighted
CTCT Employee

Re: Adding multiple contacts in the contact List

Hi,

 

I apologize that I haven't been able to address the issue more quickly, but I have been extremely busy over the last few workdays.  I will respond via email once I have more information for you--I will do that today if at all possible (it is high on my list of priorities).  If anyone can add anything here in the forums, please do.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: Adding multiple contacts in the contact List

Hi shannon,

 

Any luck because I am just stuck in the adding contacts in bulk. otherwise as soon as I am learning constancontact. your script are so much powerful and your concern to my problem is appreciative. Please help me out in this.