Hey! Persistently, but unsuccessfully trying to reach the server using curl . I want to get an answer but in the end I get a message about the api key error.
In short, I try to connect using the scheme as it is if I specifically try to translate this request into php. I make a request from the server without an ssl certificate.
GET https://mercury.postlight.com/parser?url=https://trackchanges.postlight.com/building-awesome-cms-f034344d8ed Content-Type: application/json x-api-key: SWN6wongtJ6krFOa4MHwzRsAzHcaruPqGkrDqH8A I do it this way:
<?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://mercury.postlight.com/parser'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'x-api-key: ********************' )); curl_setopt($curl, CURLOPT_POSTFIELDS, 'url=http://www.velosite.ru/kak-vybrat-velosiped-dlja-vzroslogo/'); $out = curl_exec($curl); echo $out; curl_close($curl); To which I get in response:
{"message":"Missing Authentication Token"} What needs to be changed? I don't understand something at all :(