Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

Add new contact but didn't add to member list

SOLVED
Go to solution
user7134891
Rookie
0 Votes

{
"email_address": {
"address": "test@test.com",
"permission_to_send":"explicit"
},
"first_name":"test test",
"create_source": "Contact",
"list_membership":["36835928-ec85-11ec-b253-xxxxxxxxxxxx"]
}

 

I got this response :

{
"contact_id": "c2833c6e-ecb1-11ec-bab9-xxxxxxxxxxxx",
"email_address": {
"address": "test@test.com",
"permission_to_send": "explicit",
"created_at": "2022-06-15T13:47:55Z",
"updated_at": "2022-06-15T13:47:55Z",
"opt_in_source": "Contact",
"opt_in_date": "2022-06-15T13:47:55+00:00",
"confirm_status": "off"
},
"first_name": "test test",
"create_source": "Contact",
"created_at": "2022-06-15T13:47:55Z",
"updated_at": "2022-06-15T13:47:55Z"
}

 

I have two. questions:

First  "confirm_status": "off"  why confirm status off ?

Second the contact didn't add to my list 

 

 

 

1 ACCEPTED SOLUTION
John__B
Employee
0 Votes

Hello user7134891,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

The confirm_status corresponds with your account’s confirm opt-in setting. If confirm opt-in is enabled on your account, the response would be “pending” if the contact has yet to confirm their subscription or “confirmed” if the contact has confirmed their subscription. If confirmed opt-in is not enabled on your account, the response will be “off” by default. Below I’m including documentation on managing confirmed opt-in on your account.

 

Enable Confirm Opt-In for New Sign-Ups:

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-emai...

 

It appears that your contact was not added to the list you specified because the list_memberships subresource you included in the request was missing an “s” at the end. In your request, the subresource is “list_membership”. Our system is expecting the subresource to be “list_memberships”.  

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

View solution in original post

3 REPLIES 3
John__B
Employee
0 Votes

Hello user7134891,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

The confirm_status corresponds with your account’s confirm opt-in setting. If confirm opt-in is enabled on your account, the response would be “pending” if the contact has yet to confirm their subscription or “confirmed” if the contact has confirmed their subscription. If confirmed opt-in is not enabled on your account, the response will be “off” by default. Below I’m including documentation on managing confirmed opt-in on your account.

 

Enable Confirm Opt-In for New Sign-Ups:

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-emai...

 

It appears that your contact was not added to the list you specified because the list_memberships subresource you included in the request was missing an “s” at the end. In your request, the subresource is “list_membership”. Our system is expecting the subresource to be “list_memberships”.  

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
user7134891
Rookie
0 Votes

Thank you sir ...

Another question please what about token ?? 
What is the way to get a non-expired token?

Let me tell  you my process :
Every user register in my website I need to subscribed him in my newsletter on Constant Contact .
But the lifetime for token is 24 hours so every day I 'm forced to send api call to refresh token, check token valid  and after 120 days the refresh token key will be expired  also .
So how can aI handle this issue Please ?
Thanks a lot for reply and I hope to answer me again .
Best regards

John__B
Employee
0 Votes

Hello user7134891,

 

Thank you for reaching out to Constant Contact API Developer Support.

 

Utilizing refresh tokens to refresh the access token and maintain account authorization for your application is an essential part of our Authorization Code and PKCE authorization flows. One option you could use to simplify this process is switching your refresh token type from Rotating Refresh Tokens to Long Lived Refresh Tokens in your application settings. With the Long Lived Refresh Tokens option, your Refresh token will continue to be valid after exchanging it for an access token, so you wouldn’t need to worry about having your application update the refresh token with each refresh token request. This option can be found under the “OAuth2 Settings” in your application settings. Below I’m also including overview documentation for our available OAuth2 authorization flows.

 

OAuth2 Overview:

https://v3.developer.constantcontact.com/api_guide/auth_overview.html

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up