Please forgive me for being repetitive. I originally posted a comment on another (similar) thread, but haven't gotten any responses. I've done API work for Hubspot and Mailchimp, but I am beyond baffled at Constant Contact's PHP samples. Hopefully, I'm missing something painfully simple. I have bumbled my way through the OAuth2 process, and have my token, which I plan on storing in a database and calling as necessary- as other users have suggested. My question is this: What in the world do I now do with this token? I am working from the PHP wrapper. There are a number of references to hard-coding the token (or calling it from a DB, etc) but I can find no mention of how to actually do this. For example, the addContact.php sample tells me that the user could not be found in the Datastore and must be authorized. I do so, and get my token. Great. Wonderful. But where can I "plug in" the token so that the sample app can make use of it? As is, the sample applications don't seem to do much beyond walking you through getting the token. Could someone help me identify where in the PHP wrapper I would provide the token such that I don't have to authorize every single time? What is the point of having an API if I still have to provide my credentials for every new session? Again, please pardon my frustration. I must be missing something very elementary and any insight would be terrific.
... View more
Shannon: I've been tinkering with the PHP wrapper for a few days now, and I'm more than a little confused. I've gone through all of the authentication steps, and I have obtained my token, but I can't for the life of me figure out how to put it to good use. I have a website with a user registration / login system in place. When a user registers, I simply want the user to be added to a specific Constant Contact list. In my case, I am only collecting their first name / last name / email. Here is how the flow works right now: Client creates an account, and the code from addContact.php is called with the list hard-coded (instead of being selected via a form, as is the case in the example). When that code is called, I get 'Username XXXXX not found in datastore. Click here to authorize.' which, of course, requires my Constant Contact username / password. Obviously, a prospect on my website creating an account does not have my credentials and could never proceed past this point. Am I missing something here? It appears that all of the samples provided only work to return the OAuth2 token. I've already done that. Now, how to move forward and actually use the token to add a contact?
... View more