php file_get_contents gets 403 on api/v3/account

Hello Everyone, I’m trying this :

$totalParams = 'recvWindow=60000&timestamp=' . $timestamp;
$signature = hash_hmac ( "sha256", $totalParams , $secretKey );

$url = 'https://api.binance.com/api/v3/account';
$queryString = $totalParams . "&signature=" . $signature;

$options = array(
  'http' => array(
 'header'  => "X-MBX-APIKEY: " . $apiKey,
 'method'  => 'GET',
 'content' => $queryString
  ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

But I get the

403 forbidden error

, somebody knows why ? FYI from doc: HTTP 403 return code is used when the WAF Limit (Web Application Firewall) has been violated.
But I don’t know what this means and what to do about it ^^

Hi. There are several possible reasons for it. Please refer to this post.

the querystring had to be attached to the url, and not put in the content…
See the working code :

	$signature = hash_hmac ( "sha256", $totalParams , $this->secretKey );

	$queryString = $totalParams . "&signature=" . $signature;
	$queryurl = $url . '?' . $queryString;

	$options = array(
	  'http' => array(
		'header'  => "X-MBX-APIKEY: " . $this->apiKey,
		'method'  => 'GET',
	  ),
	);
	$context  = stream_context_create($options);
	$result = file_get_contents($queryurl, false, $context);