# User-Pass Authentication

The **User-Pass Authentication** method lets you connect to 9Proxy’s Residential Proxy network using a Sub-User account (username and password).

It’s the most common and flexible setup - ideal for managing multiple devices or users independently.

## 1. Get Started

Open the [**Proxy Generator**](https://docs.9proxy.com/getting-started/residential-proxy-by-gb/proxy-generation) from your **Dashboard** (**Residential Proxies by GB** → **Get Proxy**), then select **User-Pass Auth** as your connection method.

<figure><img src="https://1693667300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuuHdu9z8IgffZvLnM2A%2Fuploads%2FHAXPNLlvtim0LsgtzHKy%2Fresidential-by-gb.png?alt=media&#x26;token=cb575ccd-b75f-40d9-87c1-829d55800c6d" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Choose a Sub-user

If you don’t have a Sub-User yet, or want to create a new one:

* Choose **Add new user**

<figure><img src="https://1693667300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuuHdu9z8IgffZvLnM2A%2Fuploads%2FeV1tfEwBdsW44gGGY6WO%2F2.png?alt=media&#x26;token=b17095a1-3f03-47b6-9d04-acb0affd7fb6" alt=""><figcaption></figcaption></figure>

* Enter your desired Username and Password.
* Choose Action Type:

<table data-header-hidden><thead><tr><th width="128.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>Allocation</strong></td><td>Assign a specific bandwidth amount to the user.</td></tr><tr><td><strong>Unlimited</strong></td><td>No usage or bandwidth limit.</td></tr></tbody></table>

<figure><img src="https://1693667300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuuHdu9z8IgffZvLnM2A%2Fuploads%2FznF3RWuv5XZ2GCkEnjfe%2F3.png?alt=media&#x26;token=4a8fa361-6415-440b-9442-d459ff9dccc9" alt=""><figcaption></figcaption></figure>

* (Optional) Add a **Remark** for internal notes.
* Click Add Sub-User to save. You can now select this Sub-User (username + password) for your proxy connection.

**If you already have a Sub-User:**

From the Sub-User dropdown list, select the Sub-User you want to use as your authentication method.

{% hint style="success" %}
Note: You can create multiple Sub-Users and manage them individually (including adding, locking, or adjusting their traffic limits) in the Sub-User window located in the top navigation bar.
{% endhint %}

{% endstep %}

{% step %}

### Select Proxy Location

Customize your proxy location with the following options:

<table data-header-hidden><thead><tr><th width="169.6666259765625"></th><th></th></tr></thead><tbody><tr><td><strong>Country/Region</strong></td><td>Choose from a list of supported countries. Choosing Random means that the IP address's location will be picked randomly from one of our residential IP pools.</td></tr><tr><td><strong>State</strong></td><td>Displays available states within your chosen country.</td></tr><tr><td><strong>City</strong></td><td>Shows all available cities under that state.</td></tr><tr><td><strong>ISP</strong></td><td>Filter proxies by Internet Service Provider.</td></tr></tbody></table>

<figure><img src="https://1693667300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuuHdu9z8IgffZvLnM2A%2Fuploads%2FVBcOBvIovRaou58BKlb8%2F4.png?alt=media&#x26;token=786d7121-65d0-4de7-a1a0-63a740014cc2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select Session Type

<table data-header-hidden><thead><tr><th width="169.666748046875"></th><th></th></tr></thead><tbody><tr><td><strong>Sticky Session</strong></td><td>Keeps the same IP address for a configured duration. Ideal for maintaining session consistency. You can define the number of minutes for the sticky session.</td></tr><tr><td><strong>Rotating Session</strong></td><td>Assigns a new IP address with every request or based on your configuration - perfect for web scraping or anonymous browsing.</td></tr></tbody></table>

Once selected, you’ll see your Host, Port, Username, Password, and Test Command on the left side of the panel.
{% endstep %}

{% step %}

### Generate Proxies

In the **Proxy Generator** section, choose:

* The number of endpoints you need in Quantity section
* Your preferred Output Format. Supported formats include:

```
// syntax

username:password:hostname:port
hostname:port:username:password
username:password:hostname:port

```

Once selected, the **Batch Generation** panel will display your connection strings. These proxies will be ready to use and automatically connect to 9Proxy’s network.

Congrats! You've successfully generated a ready-to-use list of proxy endpoints.

Your connection strings are now available and ready to integrate into your tools, scripts, or applications.
{% endstep %}
{% endstepper %}

## 2. Code Example

To help you get started quickly, we provide ready-made code snippets for testing your proxies.

You can choose from a variety of popular languages and frameworks. Each example shows you how to structure your proxy request using the format you've selected.

{% hint style="success" %}
**Tip**: Click the Copy button in the bottom right corner of any code box to easily paste it into your environment.
{% endhint %}

## 3. Troubleshooting

If your proxies fail to connect or return empty results:

* Ensure your Sub-User credentials or whitelisted IP are correct.
* Verify that your package still has active bandwidth remaining.
* Check your port range configuration (ports must be available and not in use).
* Wait a few seconds - proxy generation may take time if you request a large batch.

{% columns %}
{% column %}

#### Support Channels:

{% endcolumn %}

{% column %}

* **Email**: <support@9proxy.com>
* **Live Chat**: Available on[ 9proxy.com](https://9proxy.com)
* **Telegram**: @Official9Proxy
  {% endcolumn %}
  {% endcolumns %}
