API Documentation

Diese Dokumentation erklärt, wie du deine Anwendung registrierst, konfigurierst und entwickelst, damit du unsere APIs erfolgreich nutzen kannst.

Authentication

All API requests require authentication using an access token. You can obtain an access token by registering your application.

Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Base URL

All API endpoints are relative to:

https://hi24.co.uk/api/v1
Rate Limiting

API requests are limited to 1000 requests per hour per access token.

App erstellen

Damit deine Anwendung auf unsere APIs zugreifen kann, musst du deine Anwendung mit der App Dashboard. Bei der Registrierung wird eine App-ID erstellt, mit der wir wissen, wer du bist und die uns hilft, deine App von anderen Apps zu unterscheiden..

OAuth Login

Starting the OAuth login process, use a link like this:

<a href="https://hi24.co.uk/api/oauth?app_id=YOUR_APP_ID">Log in With Hi24</a>

Once the user accepted your app, they will be redirected to your App Redirect URL with auth_key:

https://mydomain.com/my_redirect_url.php?auth_key=AUTH_KEY
Access Token

To get an access token, make an HTTP POST request to the authorize endpoint:

<?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $auth_key = $_GET['auth_key']; $postData = ['app_id' => $app_id, 'app_secret' => $app_secret, 'auth_key' => $auth_key]; $ch = curl_init('https://hi24.co.uk/api/authorize'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); $response = curl_exec($ch); curl_close($ch); $json = json_decode($response, true); if (!empty($json['access_token'])) { $access_token = $json['access_token']; } ?>
User Endpoints

Get Current User — Retrieve information about the authenticated user:

GET /user/me Response: { "user_id": "", "user_name": "", "user_email": "", "user_firstname": "", "user_lastname": "", "user_gender": "", "user_birthdate": "", "user_picture": "", "user_cover": "", "user_verified": "" }

You can retrieve user info like this:

$get = file_get_contents("https://hi24.co.uk/api/get_user_info?access_token=$access_token");