Hi,
I am getting an Authentication Failure message with code retCode:50003 when trying to consume the GWN APIs.
I am successfully getting the access token, however, when trying to compute the signature - the exact way as the doc here - and call any API I got the above error message.
Here how I computed the signature and call the API.
$timestamp = round(microtime(true) * 1000);
$public_params = array('access_token' => $this->token,
'appID' => $this->client_id,
'secretKey' => $this->client_secret,
'timestamp' => $timestamp);
$public_params['signature'] = hash('sha256', '&' . http_build_query($public_params) . '&');
unset($public_params['secretKey']);
$ch = curl_init();
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_URL => $this->base_url_api . '/network/list?' . http_build_query($public_params),
CURLOPT_HTTPHEADER => array(
"Content-type: application/json"
)
);
curl_setopt_array($ch, $options);
$response = curl_exec($ch);