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.

Simple POST call -- Not Working

NicholasW174
Member

Simple POST call -- Not Working

Hi everyone,

 

I am trying to post a single file of contacts to my user's account (in this case, the test file I am trying only has one contact). However, both the cURL and typing JSON into the Request Body keeps resulting in errors. I've inserted screenshots of both of these results. Does anyone know why this POST call is not working for me for both cURL and/or JSON? Thanks for your time.

 

cURL Failure EDIT.png

JSON Failure 1.PNG

JSON Failure 2.PNG

4 REPLIES 4
Rich_M541
Moderator

It looks like you do not have CURL installed on your system, or if it is, it is not set in your PATH. Here's the link to official CURL download website. You'll find downloads for Windows near the bottom of the page. 

 

Regarding the 2nd image from the IO Docs, the endpoint that this method/function calls is the standard JSON Contacts Collection endpoint. This endpoint only accepts a JSON payload as described here

 

We do not have the Bulk Activities Import Contacts Multipart endpoint set up in the I/O Docs. 

 

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com

Richard,

 

Thanks for the guidance. My CURL still doesn't work after further testing. I've attached a screenshot.

 

Thanks,

Nick


cURL Failure 2.PNG

Hello,

 

I want to start by apologizing for the delay in getting you an answer on this!

 

Looking at your CURL parameters, it looks like the issue here was the formatting of your authorization header. Right now you have it set up like this:

-H "Authorization" Bearer TOKEN

 However, the proper usage is as shown here:

-H "Authorization: Bearer TOKEN"

 

If you can correct this, that should allow the request to work. Please let us know if you continue to have problems!

 

Sincerely,

Elijah G.
API Support Engineer

Roger. Thanks!

Developer Portal

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

Visit Page