API General Reference

Endpoint

https://api.unimtx.com

Visit Regions & Endpoint to see more about global access points.

Common Parameters

The common parameters are the parameters that must be passed when calling the API request and are uniformly transferred using URL Query parameters.

NameTypeRequiredDescriptionExample
actionstringYesInterface identificationsms.message.send
accessKeyIdstringYesrequest AccessKey IDMvMa9eLy3BBpZqTj49vuAB

Authentication

Unimatrix provides the following two authentication methods for developers to choose from, which can be set in the Console - Credentials, with the default being Simple mode.

  • Simple Mode [Default]: This mode only verifies the AccessKey ID and does not verify the request parameters, making it easy for developers to quickly integrate.
  • HMAC Mode: This mode requires the use of AccessKey Secret to verify the request parameters to enhance the security and authenticity of the request.

Simple Mode

To use simple mode authentication, simply pass the AccessKey ID value from the Console - Credentials to the URL Query parameter accessKeyId to complete the authentication.

HMAC Mode

To use HMAC mode access authentication, all URL Query parameters should be arranged in dictionary order as the text string to be signed and signed according to the specified signature hash algorithm.

Add the required common parameters to Query as follows:

NameTypeRequiredDescriptionExample
algorithmstringYesSignature hash algorithm, currently only hmac-sha256 is supportedhmac-sha256
timestampnumberYesTimestamp (ms), acceptance tolerance time 10 minutes1620243278785
noncestringYesRandom string, accepts a random string between 8-64 characterse1098a414d09d2f6
signaturestringYesSignature stringZlbgmnCqB7Cgb3WI57Q4zrqq50xiQfi/LPbeL2kC

Generate signature

  1. Extract all URL Query parameter pairs in the request, sort them in dictionary order (ACS) according to the parameter Key, connect the Key-Values with = and the parameter pairs with & to form the text string to be signed, for example as follows.

    accessKeyId=MvMa9eLy3BBpZqTj49vuAB&action=sms.message.send&algorithm=hmac-sha256&nonce=e1098a414d09d2f6&timestamp=1620269782258
    
  2. Using the HmacSHA256 algorithm, the AccessKey Secret corresponding to the AccessKey ID is used as the signature secret key to generate a signature for the text string to be signed, and the output is a Base64 (or Hex) string, as in the following example:

    ZlbgmnCqB7Cgb3WI57Q4zrqq50xiQfi/LPbeL2kC
    
  3. Adding the signature string as the value of signature to the request URL Query parameter sends the request, resulting in the following example of a complete request URL:

    https://api.unimtx.com/?action=sms.message.send&accessKeyId=MvMa9eLy3BBpZqTj49vuAB&algorithm=hmac-sha256&timestamp=1620269782258&nonce=e1098a414d09d2f6&signature=xvv9UjzOrQFWe7fFS5IUU9iqIZrncvF093SqXsnfcK8%3D