question

Optimus avatar image
Optimus asked

OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.amazonalexa.com:443

I've been trying to get the Skill Management API working and this morning I've hit a new roadblock without haven't changed anything. I was getting a "User has not consented to this operation error last night" and without changing anything this morning, this is the curl log I'm getting:

Trying to hit the API with the same code as last night and now I'm getting:
string(513) "
* Hostname api.amazonalexa.com was found in DNS cache
* Trying 54.239.28.187...
* TCP_NODELAY set
* Connected to api.amazonalexa.com (54.239.28.187) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.amazonalexa.com:443
* stopped the pause stream! * Closing connection 0 "

Here is the code I'm using:

ob_start();  
$out = fopen('php://output', 'w');

// exchange the access token for list of skills
$c = curl_init('https://api.amazonalexa.com/v0/skills/');
curl_setopt($c, CURLOPT_HTTPHEADER, array(
  'Authorization: ' . $access_token,
  'Accept: application/json',
  'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
));
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_VERBOSE, true);
curl_setopt($c, CURLOPT_STDERR, $out);
curl_setopt($c, CURLOPT_POST, 1);

$r = curl_exec($c);
curl_close($c);
fclose($out);
$debug = ob_get_clean();
var_dump($r);
echo "<BR><BR>";
var_dump($debug);
$d = json_decode($r);

$r in this case produces bool(false) and $d outputs NULL. I host my server on Godaddy if that makes a difference. I am still able to access Login with Amazon and retrieve an access token. So, it doesn't seem like a hosting problem.

skilllogin with amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Optimus avatar image
Optimus answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.