# 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
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reelpay.com/reelpay-for-developer/to-get-started/signature.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
