Got a 'How do I' question? Join our live 'Ask a Trainer' session happening now for instant help and pro tips!

Getting null response on getAccessToken

0 Votes


Try to create an API program to access contacts on our constant contact account.
Following the OAuth2.0 Server Flow as described on your website.
First, I created the authorization request url, then retrieved the authorization code from it.
Then I passed the code to 'getAccessToken' function to get an access token. It returned null.

Not sure why I am getting null, could you help me?


$code = $request->input('code');
$ccAuthorizationURL= $this->getAccessToken($code);


curl resource @604   url: ""
  content_type: null
  http_code: 0
  header_size: 0
  request_size: 0
  filetime: -1
  ssl_verify_result: 0
  redirect_count: 0
  total_time: 0.0
  namelookup_time: 0.0
  connect_time: 0.0
  pretransfer_time: 0.0
  size_upload: 0.0
  size_download: 0.0
  speed_download: 0.0
  speed_upload: 0.0
  download_content_length: -1.0
  upload_content_length: -1.0
  starttransfer_time: 0.0
  redirect_time: 0.0
  redirect_url: ""
  primary_ip: ""
  certinfo: []
  primary_port: 0
  local_ip: ""
  local_port: 0
  http_version: 0
  protocol: 0
  ssl_verifyresult: 0
  scheme: ""
  appconnect_time_us: 0
  connect_time_us: 0
  namelookup_time_us: 0
  pretransfer_time_us: 0
  redirect_time_us: 0
  starttransfer_time_us: 0
  total_time_us: 0


0 Votes

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


It looks like we'll some additional information in order to assist with troubleshooting. If you could please provide us with your full URL request, the API key you are using, as well as any timestamps you have available, we'll be able to better assist in pinpointing the cause of the null response. Please provide this information securely by reaching out to us via email at, and reference case number 28009990. We look forward to assisting you!


Courtney E.
Tier II API Support Engineer

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.
Developer Portal

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

Visit Page


API Updates

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

Sign Up