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.

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

ThirupathiJ
Regular Participant

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
Shannon_W
Employee

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