cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1604
Views
0
Helpful
0
Replies

Missing request credentials using API

userkam
Level 1
Level 1

I am missing something? how to get user list using API
Error - {“code”: 40101, “message”: “Missing request credentials”, “stat”: “FAIL”}
Code - <?php
$d = date(“D j M Y G:i:s”);

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => “https://■■■■■■■■■■■■■■■■■■■■■■■■■■/admin/v1/users”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “GET”,
CURLOPT_HTTPHEADER => array(
“Date: $d”,
“Content-Type: application/x-www-form-urlencoded”,
“Authorization: Basic”,
“Integration key: xxxxxxxxxxx”,
“Secret key: xxxxxxxxxxx” ,
“Content-Type: application/x-www-form-urlencoded”
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

0 Replies 0
Quick Links