Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hobailey on github.
  • I am swardio (https://keybase.io/swardio) on keybase.
  • I have a public key whose fingerprint is 6C3E 3980 858A 023A 2144 FC86 6EBE 918C 9103 3D90

To claim this, I am signing this object:

@hobailey
hobailey / download.php
Created May 19, 2017 11:16
Download/export knowledge base articles from desk.com (for migration to Salesforce etc)
<?php
//Note that this is a quick and (very) dirty solution, but works so thought I'd share it :-)
//Usage: Complete $loginEmail, $loginPassword and $deskSubdomain and then run the script - it will access Desk for you and download to your browser a CSV of all the articles. Note that you'll need to download manually the images (attachments) etc.
function run_desk_api($endpoint, $data=array(), $method="POST") {
$loginEmail = "";
$loginPassword = "";
$deskSubdomain = "";//the bit before desk.com when you're viewing articles etc
$ch = curl_init('https://'.$deskSubdomain.'.desk.com/api/v2/'.$endpoint);