diff --git a/samples/articles/getArticles.php b/samples/articles/getArticles.php new file mode 100644 index 00000000..276350e2 --- /dev/null +++ b/samples/articles/getArticles.php @@ -0,0 +1,24 @@ +setAuth('basic', ['username' => $username, 'token' => $token]); + +$help_center = new Zendesk\API\Resources\HelpCenter($client); + +try { + $query = $help_center->articles()->findAll(); + foreach ($query as $UserData) { + echo "
";
+        print_r($UserData);
+        echo "
"; + } +} catch (\Zendesk\API\Exceptions\ApiResponseException $e) { + echo 'You may either have not enabled Help Center or you may have entered incorrect credentials. Make sure to change the $subdomain, $username, and $token variables in this file.'; +}