> For the complete documentation index, see [llms.txt](https://developer.gotadi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gotadi.com/english/corporate-agent-partner-ca/security-requirements.md).

# Security Requirements

### API Key <a href="#api-key" id="api-key"></a>

All requests from the partner to Gotadi's system must include the following headers to support security operations and data statistics for Gotadi:

* apikey: \<api\_key>
* x-ibe-req-name: \<access\_code>

Note

The \<api\_key> and \<access\_code> values ​​are provided by Gotadi to the Partner.

***

### Digital signature <a href="#chu-ky-ien-tu-signature" id="chu-ky-ien-tu-signature"></a>

Some important APIs require a digital signature to be attached to the request and response for authentication.

<details>

<summary>Generating a Digital Signature</summary>

<img src="https://developer.gotadi.com/img/3.png" alt="" data-size="original">

The sender applies the RSA-SHA256 algorithm combined with their own Private Key to sign the digital signature on the signature data.

**Note:**\
The schema for constructing the signature data will be specifically described in each API.

Java example code

```
public static String signRSA(String signatureData, String xmlPrivateKey) throws Exception {
    PrivateKey privateKey = getPrivateKeyFromXML(xmlPrivateKey);
    Signature instance = Signature.getInstance("SHA256withRSA");
    instance.initSign(privateKey);
    instance.update(signatureData.getBytes("UTF-8"));
    byte[] signature = instance.sign();
    return Base64.encodeBase64String(signature);
}
```

</details>

<details>

<summary>Digital signature verification</summary>

<img src="https://developer.gotadi.com/img/7.png" alt="" data-size="original">

The receiver uses the RSA-SHA256 algorithm and the sender's Public Key to verify the signature created by the sender.a.

Java example code

```
public static boolean verifyRSA(String signedData, String signature, String xmlPublicKey) throws Exception {
    PublicKey publicKey = getPublicKeyFromXML(xmlPublicKey);
    Signature instance = Signature.getInstance("SHA256withRSA");
    instance.initVerify(publicKey);
    instance.update(signedData.getBytes("UTF-8"));
    return instance.verify(Base64.decodeBase64(signature));
}
```

</details>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.gotadi.com/english/corporate-agent-partner-ca/security-requirements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
