---
title: "GET /v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey"
method: GET
path: "/v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey

`GET /v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey`

## Request

- Base URL: `https://recaptchaenterprise.googleapis.com`
- URL: `https://recaptchaenterprise.googleapis.com/v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.

## Path parameters

- `projectsId` string, required
- `keysId` string, required

## Response `200`

Successful response

- GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse: Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA.
  - `legacySecretKey` string: The secret key (also known as shared secret) authorizes communication between your application backend and the reCAPTCHA Enterprise server to create an assessment. The secret key needs to be kept safe for security purposes.

---

[API](https://skmtc.dev/google/apis/recaptchaenterprise.md) - [All operations](https://skmtc.dev/google/apis/recaptchaenterprise/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/recaptchaenterprise/revisions/26f34c638048?raw)
