Using the following code I get the value of null returned any idea why. I have the correct token which isn’t shown here for security reasons.
$apiUrl = ‘https://api.monday.com/v2’;
$headers = [‘Content-Type: application/json’, 'Authorization: ’ . $token];
//var_dump($headers);
//print"
";
$query = ‘{ boards { id name } }’;
$data = @file_get_contents($apiUrl, false, stream_context_create([
‘http’ => [
‘method’ => ‘POST’,
‘header’ => $headers,
‘content’ => json_encode([‘query’ => $query]),
]
]));
$responseContent = json_decode($data, true);
var_dump($responseContent);
Null value being returned when trying to get boards
Login to monday.com
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


