HTTP request failed! HTTP/1.1 403 Forbidden

hlohlohlohlo Member
edited October 2017 in General

I am trying to access the url but i get a forbidden response: error 403
My api ID and key are correct.
I have specified my application_url in the oxford site.
Now i dont know what the problem is would appreciate if you can help
Im using php:

<?php $app_id = "*****"; $app_key = "*******"; $language = "en"; $target_lang = "tn"; $word = "change"; $word_id = $word; //word id is case sensitive and lowercase is required $ch = curl_init(); $url= "" . $language . "/" . $word_id . "/translations=" . $target_lang; $headers = [ 'app_key: ' .$app_key, "app_id: " . $app_id, 'Accept: application/json', 'Referer:']; $jsonData = file_get_contents($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT_MS, 20000); $result = curl_exec($ch); $json = json_decode($jsonData, true); curl_close($ch); echo $json["text"][1]["text"]; ?>


Sign In or Register to comment.