# Add client certificate

This is a pre-built Action located under the **WebService List Element**. The functionality of this action in Avo Assure is to add a valid certificate file from the specified folder to the target Uniform Resource Locator (URL). A client certificate is added before sending an API request mainly for authentication and secure trust establishment.

This action supports the following certificate file types:&#x20;

* Java KeyStore (JKS)&#x20;
* Privacy Enhanced Mail (PEM)
* Personal Information Exchange (PFX)
* Public Key Cryptography Standards #12 (PKCS12)

## Syntax

**Input Value**: `<ClientPath>;<ClientKey_path>(Optional);<ClientKey_Pwd>[AES Encrypted](Optional);<ServerPath>(Optional)`&#x20;

| Argument                                               | Description                                                                                                    |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| <p>\<ClientPath><br>(Required)</p>                     | Provide the path of a client certificate file for authenticating the request.                                  |
| <p>\<ClientKey\_path><br>(Optional)</p>                | Provide the path of the private key file from the local system associated with the client certificate.         |
| <p>\<ClientKey\_Pwd>\[AES Encrypted]<br>(Optional)</p> | Provide the encrypted password associated with the client certificate file.                                    |
| <p>\<ServerPath><br>(Optional)</p>                     | Provide the path of a server certificate or CA certificate for validating the server during the SSL handshake. |

**Output Value**: N/A

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

### Example: Adding a Client Certificate to a Target URL

In this example, we explain how to attach a valid client certificate from the specified folder and enable secure authentication for the target URL.

* **Action**: Add client certificate
* **Input Value**: C:\Certificates\ClientCert.pem;C:\Certificates\PrivateKey.key;LzoRT2Mqd2nVctlrxiZd1A==;C:\Certificates\ServerCert.pem
  * The first argument (**C:\Certificates\ClientCert.pem**) specifies the path of the client certificate file used to authenticate the request.
  * The second argument (**C:\Certificates\PrivateKey.key**) specifies the path of the private key file associated with the client certificate.
  * The third argument (**LzoRT2Mqd2nVctlrxiZd1A==**) specifies the AES-encrypted password for the private key.
  * The fourth argument (**C:\Certificates\ServerCert.pem**) specifies the path of the server certificate file.
* **Logical Explanation**: The **Add client certificate** action fetches the values from the **Input Value** column (**C:\Certificates\ClientCert.pem;C:\Certificates\PrivateKey.key;LzoRT2Mqd2nVctlrxiZd1A==;C:\Certificates\ServerCert.pem**). The action validates the provided certificate paths, encrypted password, and attaches the certificate to the target URL.

<figure><img src="/files/3p2sdjefl1EmFfvkmhp5" alt=""><figcaption></figcaption></figure>


---

# 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.avoautomation.com/avo-assure/actions/web-service-operations/web-service-list/add-client-certificate.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.
