Error while accessing API

Pranay456 edited May 2019 in PHP client
While accessing the API, I am getting Error : invalid api_key or access token(PFA-Snapshot). The api_key is correct and access_token too. I have used api_key to generate request_token.

This is the PHP code I am using -

$url = "";
// &X-Kite-Version=3&Authorization=token api_key:access_key
$header = array(
'X-Kite-Version' => '3',
'Authorization' => 'token api_key:access_key'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$head = curl_exec($ch);
echo ($head);

help me solve the issue.
Sign In or Register to comment.