I have been using the following PHP code to request user data via the Patreon API for about half a year now.
$url = ‘api.patreon.com/oauth2/token’;
$data = array(
‘code’ => $code,
‘grant_type’ => “authorization_code”,
‘client_id’ => “xx”,
‘client_secret’ => “xx”,
‘redirect_uri’ => “xx”);
$response = json_decode(httpPost($url ,$data));
$accessToken = $response->access_token;
$api_client = new Patreon\API($accessToken);
$patron_response = $api_client->fetch_user();
$patron = $patron_response[‘data’];
function httpPost($url, $data)
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
Where the using statements are from this project https://github.com/Patreon/patreon-php
But since about 1 day I am not able to request data anymore from the API.
The response object I receive is null.
Did anything change that I am not aware of ?