This article provides instructions and examples for validating your server API token in order to gain access to the MindTouch API.
Before applying your server API token you need to generate that token. Review our documentation on how to generate a server API token.
What you'll need
You should have recorded the following when generating your API token:
How to use your server API token
To gain access to the MindTouch API, you first need to pass the server API token to MindTouch. Your token will be in the following format:
Server API credential breakdown
||Provided with your server API token.|
||The current time in Unix timestamp (e.g. Current time: 02/03/2015 @ 5:10am (UTC); Unix timestamp: 1422940200).|
||MindTouch requires HMAC SHA256 hashing of server API tokens. The benefit of HMAC SHA256 over plain SHA256 is it provides MindTouch the ability to detect if the hashed token has been tampered with since being generated by your server.|
The following are code snippets for PHP, C# and Node.js to get you started:
Upon receipt, MindTouch calculates the same credentials and matches them to the credentials received. Once validated, your integration can access the MindTouch API.