Perl API doesn't work anymore

22 views
Skip to first unread message

Ronald Niederhagen

unread,
May 4, 2025, 5:48:55 AMMay 4
to OpenAIP - Aviation Data Platform
Hi,
I've been using a Perl script to download OpenAIP airspaces for a number of countries an combine them into one openAIR (Extended) format. For some reason the script fails with the error message "403 Forbidden"
Here is a piece of my Perl code:

 #Create a user agent object
 my $ua = LWP::UserAgent->new(
     ssl_opts => {
         SSL_verify_mode => SSL_VERIFY_NONE(),
         verify_hostname => 0
     }
 );
 $ua->agent('Mozilla/5.0');

  $req_url = https://api.core.openaip.net/api/airspaces?country=DE&page=1&approved=true&apiKey=<here_my_apiKey>;
  my $req = HTTP::Request->new( GET => $req_url );
  $req->content_type('application/json');
  #Pass request to the user agent and get a response back
  my $res = $ua->request($req);
  die $res->status_line unless $res->is_success;

I'm using a newly generated apiKey.
Perhaps I'm missing some essential header, request, or something???

So does anybody have an idea whats wrong?
Can somebody supply an example of a working Perl script?

webmaster

unread,
May 4, 2025, 5:50:30 AMMay 4
to OpenAIP - Aviation Data Platform
Hi,

it seems that the system did not automatically handle existing API keys after our auth provider change. Please try to create a new API key and report back if it works or not.

Cheers,

Stephan

Ronald Niederhagen

unread,
May 4, 2025, 6:56:45 AMMay 4
to OpenAIP - Aviation Data Platform
Hi Stephan,
I created the new API key  just today. Same issue.

Is there an example perl code I can look at?
Reply all
Reply to author
Forward
0 new messages