If you use Talenta, you can integrate it with other applications. To be able to do this, you need an API that works to integrate third-party backend services with Talenta's central HRIS system. To check the results of the API data, you can use applications such as Postman and Insomnia. You can also click here to learn how to integrate Talenta with HMAC.
The following guide is for testing using Postman, implementation in other programming languages is the responsibility of the user. As an example and general introduction to HMAC authentication, you can see it here.
Following are the steps for checking the API via Postman.
- Download and install Postman apps here.
- Generate API Token at https://developers.mekari.com
- Then input the Application Name.
- And select Company.
Choose the scope you want. The following is an example if the scope is selected for the employee list to get data for all employees.
- Then click “Submit”.
Next, the API Token will appear as follows. Click the "copy" icon to copy the Client ID and Client Secret.
Then, open the Postman Application and paste the Client ID and Client Secret like the following example.
No Explanation 1 In number 1, make sure the method entered is in accordance with the documentation. In this case the method used is GET. 2 In number 2, make sure the URL entered is the URL link you want to go to. In this case https://api.mekari.com/v2/talenta/v2/employee?limit=20 3
At number 3 enter the following code.
const Header = require('postman-collection').Header;
const url = require('url');
const hmac_username = "HMAC_USERNAME";
const hmac_secret = "HMAC_SECRET";
const requestUrl = url.parse(request['url']);
const requestLine = pm.request.method + ' ' + requestUrl.path + ' HTTP/1.1';
const dateString = new Date().toUTCString();
const digest = CryptoJS.HmacSHA256(['date: ' + dateString, requestLine].join('\n'), hmac_secret);
const signature = CryptoJS.enc.Base64.stringify(digest);
const hmac_header = 'hmac username="' + hmac_username + '", algorithm="hmac-sha256", headers="date request-line", signature="' + signature + '"'
pm.request.headers.add(new Header("Authorization: " + hmac_header));
pm.request.headers.add(new Header("Date: " + dateString));
4 Enter the token according to the token that was generated at point 7.
If successful, the following will appear in the response section.
This is an explanation of how to use the API with the Postman application. Furthermore, you can learn how to mask data in the Talenta API here.