this is my code with app and api key
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://perfecttense.p.rapidapi.com/correct”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => “responseType=%5B%22corrected%22%2C%20%22grammarScore%22%2C%20%22rulesApplied%22%2C%20%22offset%22%2C%20%22summary%22%5D&text=This%20articl%20have%20some%20errors”,
CURLOPT_HTTPHEADER => array(
“appauthorization: 83OrpHxrOFuM7Ked4wptegtt”,
“authorization: nwHyQwHoag9bL5sxUwaxewtt”,
“content-type: application/json”,
“x-rapidapi-host: perfecttense.p.rapidapi.com”,
“x-rapidapi-key: 2ecd105bedmsh0e508063da05e04p1ec3b6jsn5532e8954ef2”
),
));
curl);
curl);
curl_close($curl);
if ($err) {
echo “cURL Error #:” . $err;
} else {
echo $response;
}
Join in the discussion - add comment below: