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

# reCAPTCHA Bypass

> How to bypass reCAPTCHA challenges

## Overview

reCAPTCHA is Google's bot detection system that presents challenges to verify human users. When Stably encounters reCAPTCHA during automated testing, it can block test execution. This often happens during the login or signup flow.

## Solutions

There are a number of solutions to work around this that might fit your needs.

### Solution 1: Disable for testing

If you have non-production deployments, such as staging or preview deployments, these are ideal for testing. The easiest solution in these cases is to simply have your dev team disable reCAPTCHA for these environments

### Solution 2: IP Allowlisting

If you need to test against production or cannot disable reCAPTCHA in your staging/development environment, you can allowlist Stably's IP addresses. For the list of IPs, see our [Stably IP Allowlist documentation](/trouble-shooting/allowlist-stably). There are two main ways to implement this:

#### IP Allowlisting: reCAPTCHA Enterprise

If you are on reCAPTCHA's enterprise plan, you can follow their [instructions](https://cloud.google.com/recaptcha/docs/allowlist-ip) using our [Stably IP Allowlist](/trouble-shooting/allowlist-stably)

#### IP Allowlisting: Self-managed allowlisting

If you do not have reCAPTCHA Enterprise then you can instead implement allowlisting yourself in code. The implementation will of course differ, but it will look something like:

```typescript theme={null}
const allowlistedIPs = ['44.227.156.59', '44.226.77.61'];
const clientIP = (req.headers['x-forwarded-for'] || req.connection.remoteAddress || '').split(',')[0].trim();

if (allowlistedIPs.includes(clientIP)) {
  // Skip reCAPTCHA validation
} else {
  // Proceed with reCAPTCHA validation
}
```

For the latest allowlist, please see our [Stably IP Allowlist](/trouble-shooting/allowlist-stably).
