Dokumentation

API Version 1.1

Diese Dokumentation erklärt, wie Sie Ihre Anwendung registrieren, konfigurieren und entwickeln, damit Sie unsere APIs erfolgreich nutzen können.

App erstellen

Damit Ihre Anwendung auf unsere APIs zugreifen kann, müssen Sie Ihre Anwendung mit der App Dashboard. Bei der Registrierung wird eine App-ID erstellt, mit der wir wissen, wer Sie sind und die uns hilft, Ihre App von anderen Apps zu unterscheiden..

  1. Sie müssen eine neue App erstellen Neue App erstellen
  2. Sobald Sie Ihre App erstellt haben, erhalten Sie app_id und app_secret
Login mit

Login with system is a fast and convenient way for people to create accounts and log into your app. Our Login with system enables two scenarios, authentication and asking for permissions to access people's data. You can use Login With system simply for authentication or for both authentication and data access.

  1. Um den OAuth-Anmeldeprozess zu starten, müssen Sie einen Link für Ihre Anwendung wie folgt verwenden:
    <a href="https://www.fahndungx.com/api/oauth?app_id=YOUR_APP_ID">Login with FAHNDUNGX</a>

    The user will be redirect to Login with page like this

  2. Sobald der User Ihre App akzeptiert hat, wird er zu Ihrer App-Redirect-URL weitergeleitet mit auth_key wie diese:
    https://mydomain.com/my_redirect_url.php?auth_key=AUTH_KEY
    Diese auth_key valid only for one time usage, so once you used it you will not be able to use it again and generate new code you will need to redirect the user to the Login with link again.
Access Token

Once you get the user approval of your app Login with window and returned with the auth_key Das bedeutet, dass Sie jetzt bereit sind, Daten von unseren APIs abzurufen. Um diesen Prozess zu starten, müssen Sie Ihre Anwendung autorisieren und die access_token und Sie kömmem unsere Schritte befolgen, um zu lernen, wie man es bekommt.

  1. Um ein Zugriffstoken abzurufen, stellen Sie eine HTTP-GET-Anfrage an den folgenden Endpunkt wie folgt:
    <?php
    
    $app_id = "YOUR_APP_ID"; // your app id
    $app_secret = "YOUR_APP_SECRET"; // your app secret
    $auth_key = $_GET['auth_key']; // the returned auth key from previous step
    
    // Prepare the POST data
    $postData = [
      'app_id' => $app_id,
      'app_secret' => $app_secret,
      'auth_key' => $auth_key
    ];
    
    // Initialize cURL
    $ch = curl_init('https://www.fahndungx.com/api/authorize');
    
    // Set cURL options for POST
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
    
    // Execute request
    $response = curl_exec($ch);
    
    // Check for cURL errors
    if (curl_errno($ch)) {
      die('cURL error: ' . curl_error($ch));
    }
    
    curl_close($ch);
    
    // Decode the JSON response
    $json = json_decode($response, true);
    
    // Use the access token if available
    if (!empty($json['access_token'])) {
      $access_token = $json['access_token']; // your access token
    }
    ?>
    
    Diese access_token valid only for only one 1 hour, so once it got invalid you will need to genarte new one by redirect the user to the Login with link again.
APIs

Sobald Sie Ihre access_token Jetzt können Sie Informationen aus unserem System über HTTP GET-Anfragen abrufen, die folgende Parameter unterstützen

Endpunkt Beschreibung
api/get_user_info

Userinformationen abrufen

Sie können die Userinformationen wie folgt abrufen

if(!empty($json['access_token'])) {
    $access_token = $json['access_token']; // your access token
    $get = file_get_contents("https://www.fahndungx.com/api/get_user_info?access_token=$access_token");
}

Das Ergebnis wird sein:

{
  "user_info": {
  "user_id": "",
  "user_name": "",
  "user_email": "",
  "user_firstname": "",
  "user_lastname": "",
  "user_gender": "",
  "user_birthdate": "",
  "user_picture": "",
  "user_cover": "",
  "user_registered": "",
  "user_verified": "",
  "user_biography": "",
  "user_website": ""
  }
}
 
   
   
     
             
           
        FAHNDUNGX         https://www.fahndungx.com