As mentioned earlier, "auth" is used as a protection against others just copying your code for use and you getting billed for it. This is all behind the scenes so just know it's protecting you. The auth field will need to be filled in for any endpoint you wish to use. Enter "authairport567" into the auth field.
In addition to the auth field, you will see the values you can pass into the query. For the example shown below, we want the Airport Details for Los Angeles International Airport so we enter the IATA ID, LAX, in the field.
It should be noted that there may be cases where there are multiple airports containing the same string across the IDs such as GNB. Go perform a search on GNB at
https://airportguide.com/search/airport-search/ to see what I mean; there are 5 airports containing GNB in the ID.
Now choose your application under the REQUEST HEADERS section. This is basically your personal app that you will use the API under. If you haven't created an app yet then do it now under the pulldown menu labeled Default Application.
You are just about there!
Copy the code snippet from the box on the right and put it in a text editor for future use. For this example, the PHP code is
========
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forteweb-airportguide-airport-basic-info-v1.p.rapidapi.com/get_airport_by_iata?airport_id=LAX&auth=authairport567",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Host: forteweb-airportguide-airport-basic-info-v1.p.rapidapi.com",
"X-RapidAPI-Key: whqPQIeKmshNhPAbKj2l6TxlIvp1nxIFljsnBLICaxurAACZ"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
=========