Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Userinfo

Moritz Walter edited this page Feb 2, 2020 · 1 revision

Um die Userdaten (Email, Nickname, Profilbild) Abzufragen:

Ohne E-Mail: https://oauth.the-systems.eu/api/user/index.php

Mit E-Mail: https://oauth.the-systems.eu/api/userinfo/index.php (Benötigt Email Scope)

        $info_request = "https://oauth.the-systems.eu/api/userinfo/index.php";
        $info = curl_init();
		
		curl_setopt_array($info, array(
			CURLOPT_URL => $info_request,
			CURLOPT_CUSTOMREQUEST => "POST",
			CURLOPT_POSTFIELDS => "access_token=".$access_token,
			CURLOPT_HTTPHEADER => array(
				"cache-control: no-cache",
				"content-type: application/x-www-form-urlencoded"
			),
		));
		curl_setopt($info, CURLOPT_RETURNTRANSFER, true);
		$inforesp = json_decode(curl_exec($info));
		curl_close($info);

Clone this wiki locally