Anand Lall

Authenticate using Simple (SSO)

Last updated
Available in
  • Starter
  • Professional
  • Business
  • Enterprise

Trakdesk allows you to authenticate to your helpdesk using Single Sign On. The API is simple to use and implement. 

With just a few lines of code, you can easily integrate SSO into your custom applications or server and allow your users to connect to your helpdesk without having to enter a separate username and password.

Enabling Simple SSO

  • Login to your helpdesk as an administrator.
  • Go to the Admin Page.
  • Select the Security Settings option. Enable Single Sign On and select Simple SSO.Image title

Simple SSO API

There are a few required parameters when using the Simple SSO API. Below are the required variables that you need to pass to Trakdesk SSO endpoint for authentication.

  • full_name: John Doe
  • email: jdoe@trakdesk.com
  • tstp: Unix Timestamp (UTC)
  • hash: md5 hash

Here is an example using PHP 5.0 and later

//Date function
$utc_date = DateTime::createFromFormat(   
    'Y-m-d G:i:s',   
    date('Y-m-d h:i:s'),   
    new DateTimeZone('UTC')
//Required Variables
$full_name      = 'John Doe';
$email          = 'jdoe@trakdesk.com';
$shared_secret  = 'YOUR_SHARED_SECRET';
$timestamp      = strtotime($utc_date->format('Y-m-d g:i:s'));
$helpdesk_url   = 'YOUR_HELPDESK_URL/auth/sso';
//Optional Parameters
//'auto_create_user' = false //Do not create unknown user accounts.
//'redirect'         = 'URL' // Redirect to a specific URL after login is successful.
//Compute md5 Hash
$hash = md5($full_name . $email . $timestamp . $shared_secret);
//Redirect to Trakdesk SSO endpoint
header('Location: https://'.$helpdesk_url.'?full_name='.urlencode($full_name).'&email='.urlencode($email).'&tstp='.$timestamp.'&hash='.$hash);

Note: For security reasons, the generated token resets every (10) minutes. If for some reason your application or server does not connect to Trakdesk SSO endpoint within this time frame, Authentication will fail. You will then need to generate a new token by executing your script again.

2 of 3 found this helpful

Can you give us your feedback so we can improve this article?

Why you did not find this article helpful?

Have more questions?


Sign In to post a comment