> For the complete documentation index, see [llms.txt](https://docs.reelpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reelpay.com/reelpay-for-developer/to-get-started/signature.md).

# Signature

ReelPay API authenticates your requests by AppId and AppKey. [Log in to your ReelPay account](https://merchant.reelpay.com/), go to [**AppManage page**](https://merchant.reelpay.com/appManage)**,** you can find your **AppId** and **AppKey** on this page.

{% hint style="info" %}
**AppId and AppKey** carries many privileges, so be sure to keep it secure. Please do not share your developer information in publicly accessible areas such as GitHub, client code, etc.
{% endhint %}

## Signature **Guide**

### **Header**

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| X-Sign       | string | Signature        |
| X-Timestamp  | int    | Timestamp（sec）   |
| X-Appid      | string | Merchant APPID   |
| content-type | string | application/json |

### Signature Algorithm

```go
// sign (golang)
func hmacSHA256Sign(appKey, timestamp string, body interface{}) (string, error) {
   jsonStr, err := json.Marshal(body)
   if err != nil {
      return  "", err
   }
   sha256Mac := hmac.New(sha256.New, []byte(appKey))
   _, err = sha256Mac.Write(append(jsonStr, []byte(timestamp)...))
   if err != nil {
      return "", err
   }
   return hex.EncodeToString(sha256Mac.Sum(nil)), nil
}
```
