Overview:
Sample programs for the fun of it.
- Create ticket api with cc_emails,custom_fields attribute
- Create ticket with attachments
- Create user basic
- Create user along with avatar image.
- Create user using(Net::Http)
- Update user.
- Update user with company details.
- Update ticket custom fields.
- Delete ticket
- Fetch contacts by query string.
- View ticket.
- View contact.
- Restore ticket.
- Assign ticket.
- delete user.
- rate a ticket response(survey rating)
- view survey result for the ticket.
- create customer
- update customer
- view customer
- delete customer
Freshdesk API's use the Basic Access Authentication. Refer: http://en.wikipedia.org/wiki/Basic_access_authentication
So incase if you get "error":"access denied", its possible that you are not using the basic access authentication method ie., check the request Header "Authorization" is passed with Base64 encoded string of "username:password" or "apiKey:X" [Here X is just a dummy char, you can pass anything instead]
eg: ruby: request.basic_auth("[email protected]","test")
Java:
request.setHeader("Authorization", "Basic " + Base64.encodeBase64String("username:password".getBytes())); //Note the blankspace after "Basic".
The api's used are in reference from the http://freshdesk.com/api site. Its possible the samples has errors. I will try to keep it up to date as much as possible.