Authentication

Learn how to authenticate with Residential Proxy using different username patterns and configurations.

Authentication Formats

Residential Proxy uses a flexible username-based authentication system where your username pattern determines the proxy configuration. All proxies connect through the same endpoint but behave differently based on your username structure.

Connection Format

All Residential Proxy connections use the following format:

username:password@network.mrproxy.com:10000

The username controls:

  • Proxy type (standard or mobile)
  • Country targeting
  • Session persistence
  • Session duration
  • IP rotation behavior

Authentication Patterns

1. Default (Random Country)

The simplest format uses just your username and password without any modifiers.

Format:

username:password@network.mrproxy.com:10000

Behavior:

  • Residential Proxy assigns a random ISO 3166 country
  • IP rotates on each new request
  • No session persistence

Example:

curl -x "user123:pass456@network.mrproxy.com:10000" https://api.ipify.org

Note: While the UI requires country selection, manual configuration allows random country assignment. This is useful for maximum distribution and avoiding geo-targeting.

2. Country-Specific Proxy

Target a specific country using ISO 3166 country codes.

Format:

username-country-{iso3166}:password@network.mrproxy.com:10000

Parameters:

  • {iso3166}: 2-letter ISO 3166 country code (e.g., us, uk, de, jp)

Behavior:

  • All requests use IPs from the specified country
  • IP rotates on each new request
  • No session persistence

Examples:

# Target US proxies
user123-country-us:pass456@network.mrproxy.com:10000

Use Cases:

  • Accessing geo-restricted content
  • Testing localized websites
  • Market research in specific regions
  • Price comparison across countries

3. Mobile Proxies

Access real mobile carrier IPs (3G/4G/5G) with extremely high trust scores.

Format:

username-mobile-country-{iso3166}:password@network.mrproxy.com:10000

Parameters:

  • {iso3166}: 2-letter ISO 3166 country code

Behavior:

  • Uses real mobile carrier IPs
  • Higher trust score than residential proxies
  • IP rotates on each request
  • No session persistence

Examples:

# US mobile carrier IPs
user123-mobile-country-us:pass456@network.mrproxy.com:10000

Use Cases:

  • Social media automation (Instagram, TikTok, Facebook)
  • Mobile app testing and automation
  • Ad verification on mobile platforms
  • Bypassing aggressive anti-bot systems
  • Accessing mobile-specific content
  • Mobile gaming automation

4. Session-Based Static Proxy

Maintain the same IP across multiple requests using session IDs.

Format:

username-country-{iso3166}-sessid-{session_id}:password@network.mrproxy.com:10000

Parameters:

  • {iso3166}: 2-letter ISO 3166 country code
  • {session_id}: Any alphanumeric string (e.g., session1, user_alpha, x9)

Behavior:

  • Same IP for all requests with the same session_id
  • Default session duration: 10 minutes
  • After expiration, a new IP is assigned
  • Different session_id values get different IPs

Examples:

# Session ID: alpha1
user123-country-us-sessid-alpha1:pass456@network.mrproxy.com:10000

Python Example:

import requests

proxy = {
    'http': 'http://user123-country-us-sessid-session1:pass456@network.mrproxy.com:10000',
    'https': 'http://user123-country-us-sessid-session1:pass456@network.mrproxy.com:10000'
}

# All these requests use the same IP
for i in range(5):
    response = requests.get('https://api.ipify.org', proxies=proxy)
    print(f"Request {i+1}: {response.text}")  # Same IP for all

Use Cases:

  • Account management and login sessions
  • Shopping cart operations
  • Dashboard interactions
  • Form submissions requiring consistent IP

5. Custom Session Duration

Control exactly how long a session IP persists.

Format:

username-country-{iso3166}-sessid-{session_id}-sesstime-{minutes}:password@network.mrproxy.com:10000

Parameters:

  • {iso3166}: 2-letter ISO 3166 country code
  • {session_id}: Alphanumeric session identifier
  • {minutes}: Session duration in minutes (integer)

Behavior:

  • Same IP for all requests with the same session_id
  • Session expires after {minutes} minutes
  • New IP assigned after expiration
  • Maximum flexibility for session management

Static Proxy with Custom Session Time

Examples:

# Session lasts 30 minutes
user123-country-jp-sessid-x9-sesstime-30:pass456@network.mrproxy.com:10000

Node.js Example:

const axios = require('axios');

// 20-minute session proxy
const proxy = {
  host: 'network.mrproxy.com',
  port: 10000,
  auth: {
    username: 'user123-country-us-sessid-node_session-sesstime-20',
    password: 'pass456'
  }
};

async function testProxy() {
  for (let i = 0; i < 10; i++) {
    const response = await axios.get('https://api.ipify.org', { proxy });
    console.log(`Request ${i+1}: ${response.data}`);
    
    // Wait 2 minutes between requests
    await new Promise(resolve => setTimeout(resolve, 120000));
  }
}

testProxy();

Use Cases:

  • Long scraping sessions
  • Extended browsing sessions
  • Multi-step workflows
  • Testing with specific time constraints

Authentication Summary

FormatCountryMobileSessionDurationRotation
username:passwordRandomNoNoN/AEvery request
username-country-{code}SpecificNoNoN/AEvery request
username-mobile-country-{code}SpecificYesNoN/AEvery request
username-country-{code}-sessid-{id}SpecificNoYes10 minAfter expiry
username-country-{code}-sessid-{id}-sesstime-{min}SpecificNoYesCustomAfter expiry

Best Practices

Session ID Naming

  • Use descriptive names: user_john, checkout_session, scraper_1
  • Avoid special characters (stick to alphanumeric and underscores)
  • Keep IDs under 50 characters for compatibility

Session Duration Selection

  • Short scraping tasks: 5-10 minutes
  • Account operations: 15-30 minutes
  • Extended sessions: 30-60 minutes
  • Maximum recommended: 60 minutes (to maintain IP freshness)

Security Considerations

  • Never hardcode credentials in source code
  • Use environment variables for username/password
  • Rotate session IDs regularly
  • Monitor proxy usage for anomalies

Testing Your Configuration

Test your proxy configuration with a simple cURL command:

curl -x "username-country-us:password@network.mrproxy.com:10000" https://api.ipify.org

This returns your current proxy IP address. Run it multiple times to verify rotation behavior:

# Test rotation
for i in {1..5}; do
  echo "Request $i:"
  curl -x "user-country-us:pass@network.mrproxy.com:10000" https://api.ipify.org
  echo ""
done

For session-based proxies, you should see the same IP across all requests:

# Test session persistence
for i in {1..5}; do
  echo "Request $i:"
  curl -x "user-country-us-sessid-test1:pass@network.mrproxy.com:10000" https://api.ipify.org
  echo ""
done

Common Errors

Authentication Failed

  • Verify your username and password are correct
  • Check for typos in the format pattern
  • Ensure no extra spaces in the username

Country Not Supported

  • Verify the country code is valid ISO 3166 format
  • Check that the country is in Residential Proxy's coverage area
  • Try a different country code

Session Expired

  • Increase sesstime value if sessions expire too quickly
  • Implement automatic reconnection in your code
  • Use the same session_id to maintain the session