Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.
Moritz Walter edited this page Feb 2, 2020 · 2 revisions

``Login API (Need: ClientID, ClientSecret, (Scope, URI))

Leite den User auf http://oauth.the-systems.eu/authorize.php?response_type=code&client_id=CLIENTID&state=xyz

Du erhälst in der URL ?code=CODE

AccessToken erstellen:

    $token_request = "https://oauth.the-systems.eu/token.php";
    $token = curl_init();
    curl_setopt_array($token, array(
        CURLOPT_URL => $token_request,
        CURLOPT_POST => 1,
        CURLOPT_POSTFIELDS => array(
            "grant_type" => "authorization_code",
            "client_id" => $client_id,
            "client_secret" => $client_secret,
            "redirect_uri" => $redirect_uri,
            "code" => $_GET["code"]
        )
    ));
    curl_setopt($token, CURLOPT_RETURNTRANSFER, true);
    $resp = json_decode(curl_exec($token));
    curl_close($token);

Erhälst Accesstoken und Refreshtoken

Clone this wiki locally