-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboards.php
More file actions
30 lines (22 loc) · 711 Bytes
/
boards.php
File metadata and controls
30 lines (22 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
** get All Boards
*/
$api_key = ''; //paste your API Key here https://trello.com/app-key
$outh_token = ''; //Outh Toekn
$url = 'https://api.trello.com/1/members/me/boards/?';
$url = $url.'key='.$api_key.'&token='.$outh_token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
$result = json_decode($result);
echo "<pre>"; print_r($result); echo "</pre>";