The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Need Help to add contact information to my constant contact account !

Highlighted
Occasional Contributor

Need Help to add contact information to my constant contact account !

Hello there !

 

Please please help me in this !

 

I downloaded php code to submit my webform/contact form inormation to my constant contact account, It's done successfully. But the thing is every time it is giving authentication.

 

I downloaded code from here https://github.com/constantcontact/ctct_php_library

 

I am using add_contact.php from examples folder.

 

SESSION holds the information for the authentication. If SESSION expires then it will ask again for login authentication and grant access. As my form is a webform so every user should enter constant contact login information.

 

Please help me in this how to hide all these process?

 

And also do we have any permanent session/token for authentication to avoid login every time ?

 

Your help would he highly appreciated !

 

Thanks for your help !

 

Regards,

Thiru !

1 REPLY 1
Highlighted
Employee

Re: Need Help to add contact information to my constant contact account !

Hi Thiru,

 

Once you have an access token from the OAuth2 process you can hard code it into the config.php file to avoid the authentication step.  

 

Replace the contents of config.php with this, filling in your username, password OR access token, and API Key.

 

<?php

 

$username = "";

$password = "";

$accessToken = ""; // needed for Oauth2

$apikey = "";

 

?>

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured