> ## Documentation Index
> Fetch the complete documentation index at: https://telr-docs.cashfree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> In this article, you will learn the things to do before testing our Secure ID APIs.

* [View End Points](/api-reference/vrs/getting-started#view-end-points)
* [Generate API Keys](/api-reference/vrs/getting-started#generate-api-keys)
* [Whitelist IP Address](/api-reference/vrs/getting-started#whitelist-your-ip-address)
* [2FA API Signature Generation](/api-reference/vrs/getting-started#2fa-api-signature-generation)
* [Any Queries: Contact Us](/api-reference/vrs/getting-started#any-queries-contact-us)

## View End Points

Telr uses API keys to allow access to the API. Once you have signed up at our merchant site, you will be able to see your AppId and SecretKey.

Telr expects API key to be included in all API requests to the server. Use the endpoint **/api/v1/credentials/verify** to verify your credentials.

| Environment | URL                                                                                    |
| :---------- | :------------------------------------------------------------------------------------- |
| Production  | [https://api.cashfree.com/verification](https://api.cashfree.com/verification)         |
| Test        | [https://sandbox.cashfree.com/verification](https://sandbox.cashfree.com/verification) |

## Generate API Keys

Follow the instructions below to generate API keys:

1. From the Secure ID dashboard, click **Developers** on the navigation panel.
2. Click **API Keys**.
3. Click **Generate API Keys** from the *API Keys* screen.
   <Frame caption="Generate API Keys">
     <img src="https://mintcdn.com/telr/4xxG1o1aZCyuli_h/static/secure-id/get-started/integration/getting-start-1.png?fit=max&auto=format&n=4xxG1o1aZCyuli_h&q=85&s=595aac5a1f71d6e6e9f122a07ed99bcb" width="2856" height="1618" data-path="static/secure-id/get-started/integration/getting-start-1.png" />
   </Frame>
4. The *New API Keys* popup displays with the client ID and client secret information.
5. Click **Download API Keys** to download the information and save them in your local system folder. Do not share the keys with anyone because they are confidential. You can generate a maximum of 10 API keys.

<Note>
  API Keys - Production Environment: You need to perform an OTP authentication
  to generate API keys for production environment.
</Note>

## Whitelist Your IP Address

Whitelisting the IP address or generating a public key provides a layer of authentication. These cybersecurity techniques prevent anonymous or unknown disbursement requests and allow only verified requests. Your IP address needs to be whitelisted in the Telr production server or it rejects all incoming requests.

Follow the instructions below to whitelist your IP:

1. From the Secure ID dashboard, click **Developers** from the navigation pane > **Two-Factor Authentication** from the **Secure ID** card.
2. Choose **IP Whitelist** from the **Select 2FA Method** drop-down.
3. Click **Add IP Address**.
4. Enter the IP address you want to whitelist in the respective field and click **Add IP Address** to save the details. Note that the IPv4 has to be whitelisted, and not IPv6. The whitelisted IPs are displayed in the grid as shown below. You can whitelist a maximum of 10 IPs.

<img src="https://mintcdn.com/telr/4xxG1o1aZCyuli_h/static/secure-id/get-started/integration/Screenshot_2024-01-03_at_2.03.39_PM.png?fit=max&auto=format&n=4xxG1o1aZCyuli_h&q=85&s=478a3d7ca223fdc1611b1656d6849113" alt="" width="3456" height="1986" data-path="static/secure-id/get-started/integration/Screenshot_2024-01-03_at_2.03.39_PM.png" />

<Note>
  **How to find my IP address?**

  <br />

  Depending on your operating system, you can retrieve the IP of the system via
  multiple methods. You can also find your IP using helper sites such as
  [https://whatismyipaddress.com/](https://whatismyipaddress.com/).
</Note>

## 2FA API Signature Generation

To generate a signature, you need to generate the public key. You then use the generated public key to generate the signature.

### Generate Public Key

1. From the *Secure ID* dashboard, click **Developers** from the navigation pane > **Two-Factor Authentication** from the **Secure ID** card.
2. Select **Public Key** from the *Select 2FA Method* drop-down.
3. Click **Generate Public Key**.
4. The public key is downloaded to your computer. Use your registered email ID to access the key.

### Generate Signature

Follow the steps below to generate your signature:

1. Retrieve your clientId (one which you are passing through the header X-Client-Id)
2. Append this with CURRENT UNIX timestamp separated by a period (.)
3. Encrypt this data using RSA encrypt with Public key you received – this is the signature.
4. Pass this signature through the header X-Cf-Signature.

In the case of using our library, go through the libraries section. During the initialization process, you need to pass the key as a parameter.

<CodeGroup>
  ```php PHP theme={null}
  <?php
  public static function getSignature() {
      $clientId = "<your clientId here>";
      $publicKey =
  openssl_pkey_get_public(file_get_contents("/path/to/certificate/public
  _key.pem"));
      $encodedData = $clientId.".".strtotime("now");
      return static::encrypt_RSA($encodedData, $publicKey);
    }
  private static function encrypt_RSA($plainData, $publicKey) { if (openssl_public_encrypt($plainData, $encrypted, $publicKey,
  OPENSSL_PKCS1_OAEP_PADDING))
        $encryptedData = base64_encode($encrypted);
      else return NULL;
      return $encryptedData;
    }
  ?>
  ```

  ```java Java theme={null}
  private static String generateEncryptedSignature(String clientIdWithEpochTimestamp) {
      // String clientIdWithEpochTimeStamp = clientId+"."+Instant.now().getEpochSecond();
      String encrytedSignature = "";
      try {
          byte[] keyBytes = Files
              .readAllBytes(new File("/Users/sameera/Downloads/payout_test_public_key.pem").toPath()); // Absolute Path to be replaced
          String publicKeyContent = new String(keyBytes);
          System.out.println(publicKeyContent);
          publicKeyContent = publicKeyContent.replaceAll("[\\t\\n\\r]", "")
              .replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "");
          KeyFactory kf = KeyFactory.getInstance("RSA");
          System.out.println(publicKeyContent);
          X509EncodedKeySpec keySpecX509 = new X509EncodedKeySpec(
              Base64.getDecoder().decode(publicKeyContent));
          RSAPublicKey pubKey = (RSAPublicKey) kf.generatePublic(keySpecX509);
          final Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding");
          cipher.init(Cipher.ENCRYPT_MODE, pubKey);
          encrytedSignature = Base64.getEncoder().encodeToString(cipher.doFinal(clientIdWithEpochTimestamp.getBytes()));
          System.out.println(encrytedSignature);
      } catch (Exception e) {
          e.printStackTrace();
      }
      return encrytedSignature;
  }
  ```
</CodeGroup>

## Any Queries: Contact Us

For identifying, diagnosing, and resolving problems related to API requests, ensure the information below is communicated while contacting us:

* Share the API request and response details along with `referenceId` or `verificationId`.
* Mention the registered email ID and environment in the email.
* Use your registered email address (with Telr) to send the email or mention the registered email address.
* Include your account manager in the CC of the email request.

<Note>
  For dashboard queries, share the screenshot and .har file of the screen.
</Note>
