(Originally reported at https://drupal.org/node/1890670#comment-7014818 by sebish).

I've just given a shot today to test this out as it seems interesting. I got an issue with the API key not recognized, even though it the same that the one provided by GatherContent:

The GatherContent API could not be reached. Please verify your API credentials (Error message: There was a problem contacting the API. Please check your API credentials.)

I'm using a trial version of GatherContent, it might be a reason.

Config:
- Drupal 7.19
- Only Ctools and GatherContent are installed

Not sure if you've ever seen this issue before.

Comments

brunodbo’s picture

I verified this with the GatherContent developers. They told me trail accounts have full access to the GatherContent API.

They also suggested trying the following:

"Could you please ask this someone to look for something similar to CURLOPT_SSL_VERIFYPEER (cURL setting, looks like it's in "gathercontent.module" file) and set it to false? If that helps, we will know where the problem lies and will try to fix it asap."

@sebish: Can you try the above and report back? I'll pass on the link to this issue to the GatherContent devs, so they can follow up here as well.

sebish’s picture

Ok I did further testings and it seems I only get this issue when working locally. As long as I test with an online version of Drupal, with exact same config, it works. I guess it's something on the local setup that's generating this issue.

brunodbo’s picture

Do you have cURL installed on your local? You can verify this by going to /admin/reports/status, clicking on 'more information' next to the php version, and looking for a section called 'curl' on the phpinfo page.

brunodbo’s picture

Status: Active » Postponed (maintainer needs more info)
brunodbo’s picture

Category: bug » support
sebish’s picture

Sorry to answer so late. yeah I had cURL installed locally.

brunodbo’s picture

Version: » 7.x-1.x-dev

Did you try this:

"Could you please ask this someone to look for something similar to CURLOPT_SSL_VERIFYPEER (cURL setting, looks like it's in "gathercontent.module" file) and set it to false? If that helps, we will know where the problem lies and will try to fix it asap."

alexbarrett’s picture

@brunodbo: I was having the same issue as sebish and can confirm that setting CURLOPT_SSL_VERIFYPEER to FALSE in gathercontent.module resolved the issue for me. This was also on a local Drupal installation.

brunodbo’s picture

Thanks @alexbarrett. I'll let the GatherContent developers know. Resolving this for now. Reopen if needed.

brunodbo’s picture

According to GatherContent's support team, the issue lies in the lack of certificate files that the server can use to verify GatherContent's SSL certificate.

They suggest trying the following:

  1. Download certs e.g. from here: http://curl.haxx.se/ca/cacert.pem
  2. Save them somewhere within the project (preferably with the same name)
  3. Add the following line to cURL settings in the API code: curl_setopt($session, CURLOPT_CAINFO, 'path/to/the/cacert.pem');
cdante’s picture

I am having the same issue. I can reach the settings page in my local environment but I time out completely on my remote environment.

When I do get to the settings page in my local, it says "The GatherContent API could not be reached. Please verify your API credentials (Error message: There was a problem contacting the API. Please check your API credentials.)"

cURL is enabled in both environments and changing the CURLOPT_SSL_VERIFYPEER setting to FALSE does not help.

mrharolda’s picture

I am having the same issue. I can reach the settings page in my local environment but I time out completely on my remote environment.

Does your hosting platform have an outgoing firewall by any chance?

afoster’s picture

I also can't connect the the platform using either my local environment or a testing site hosted on getpantheon.com.

Both environments report having CURL and I've tried both the following versions of the module on both environments

7.x-1.0-beta1
7.x-1.0-dev
Hacking 7.x-1.0-dev so that the CURLOPT_SSL_VERIFYPEER is set to TRUE

The error reports "The GatherContent API could not be reached. Please verify your API credentials (Error message: There was a problem contacting the API. Please check your API credentials.)

It also shows a warning "Warning message It looks like you didn't configure any GatherContent projects yet. Please do so first, and then continue your import configuration here."

molly_n’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new850 bytes

This issue was resolved for me by updating the gathercontent api url in gathercontent.module. Looks like they've gone from 0.2 to 0.3.

john cook’s picture

#14 is a partial fix - it lets you configure the module.

But GatherContent API no longer supplies the information in a format to be imported by this module.

This patch puts in the ability to parse the new API to get content into the node's body field.

john cook’s picture

StatusFileSize
new1.57 KB
brunodbo’s picture

Status: Needs review » Closed (won't fix)

This issue was marked closed (won't fix) because GatherContent has moved to Github, and is now maintained by the GatherContent team.

If this feature is still desired, please go to the Github project and create an issue there, or .