Authentication

You need to authenticate and signature your requests to access any endpoint in the SenGo API. In this guide, we'll cover how authentication works

Request Header

To authenticate your requests to the SenGo API, you need to include the following headers

Header ParameterDescription
X-Client-KeyYour unique API key. This key identifies your application and authorizes access to the API.
X-Client-TokenYour secret token. This token serves as a secret key to generate the signature.
X-SignatureThe signature generated using the HMAC-SHA512 algorithm. It ensures the integrity and authenticity of the request.

Please ensure that you include these headers in every API request to properly authenticate your application.

Signature

To generate the signature, you can use the following code snippet in your preferred programming language:

# Signature SenGo For PHP Code
$codesignature = hash_hmac('sha512',  $key + json_encode($body), $token)

In this code, replace the following variables with the appropriate values:

  • $key: Your API key.
  • $body: The JSON-encoded request body.
  • $token: Your secret token.

Environment

We currently offer two environments that you can utilize for your application:

Sandbox - https://api.sandbox.sengo.id/api

Production - https://api.sengo.id/api

Please note that the above information is subject to change, and we recommend referring to the latest documentation for accurate details.

Was this page helpful?