I need to connect to the Outbrain API (This is the documentation: http://docs.amplifyv01.apiary.io/#). There's a minor example in there, but when I tried connecting to my own account I didn't manage to do so... Can't understand if I put the wrong CURLOPT_URL or didn't write my credentials in the right form... This is my code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.outbrain.com/amplify/v0.1/login");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: BASIC BASE-64-ENC(USERNAME:PASSWORD)",
"OB-TOKEN-V1: MY_ACCESS_TOKEN"
));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
If anyone knows why it didn't worked - I'd very much appreciate it... Also if anyone has an additional code for talking with the Outbrain API - It'll help me a lot. Thank you!