Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, we provide concise yet comprehensive guidance on navigating and utilizing the dashboard features. This section includes various subsections, each focused on different aspects of the dashboard, from setting up and managing proxies to understanding metrics and adjusting settings. Whether you're a novice or an experienced user, you'll find straightforward instructions to optimize your use of our services through the dashboard.
The Domain Filtering (previously Allowances) feature is split into two sections:
Restrictions section that enables you to list domains our proxies will not access
Permissions section that enables you to create a whitelist of accessible domains
For further information on how to create and manage these lists, please refer to the 'Domain Filtering' (previously ‘Allowances’) subsection located within the ‘Dashboard’ section of our documentation.
Domain Filtering (previously Allowances)
Welcome to IPRoyal documentation. These documents provide everything you need to get started using our services. If something is missing or you want to share feedback, please contact us at or via chat on our .
Our offers answers to the most frequently asked questions about our services, billing, account settings, and more.
Our offers proxy-related news, product updates, integration tutorials, web scraping guides, code examples, and expert insights.
We also offer several free tools to make your proxy usage more convenient. These include , a Windows-based , and an page.
In the orders section, outlined by the orange dotted border in the image, you can track and manage your orders. This part of the dashboard presents a table listing all your transactions, including order ID, any associated notes, order date, the amount paid, the amount of traffic available before the order, and the current status of each order. You can search for specific orders using a note or ID, filter the entries displayed per page, and filter by order status. For each listed order, there are options to view detailed information. You also have the option to download the invoice for all confirmed orders. This feature is designed to give you a clear and organized view of your past activity and assist in managing your purchases effectively.
Before continuing, we recommend visiting our 'Proxy' documentation to understand how it works and the meaning of the inputs in the panel.
This is your proxy access configuration panel, where you can customize the settings for your proxy usage. The panel offers a variety of inputs for detailed configuration. Each setting allows you to tailor the proxy behavior to your exact requirements, such as selecting the country, state/region, ISP, and type, as well as defining rotation preferences.
Further down, you will find the formatted proxy list section. This area displays your proxies in a ready-to-use format, complete with all necessary details for each proxy connection. You have the convenient option to 'Copy' the list to your clipboard or 'Download list' for offline use. You can also select the format that best fits your needs and specify the quantity of proxies you wish to view or export. This streamlined approach ensures quick and easy access to your proxy information for immediate use.
When configuring your proxy, it's important to consider the protocol that best suits your needs. There are two primary types available: HTTP/HTTPS and SOCKS5. Each protocol operates on its distinct set of ports and serves different purposes. We offer two primary types of proxy protocols.
Please note that our Residential proxies are compatible with TCP connections.
This is the most widely used protocol for web browsing. Our HTTP proxies are ideal for accessing websites and managing web-based traffic. For enhanced security, particularly when handling sensitive data, our HTTPS proxy adds an encryption layer to secure the data transmission between the client and the server. These proxies typically function on ports designated explicitly for HTTP or HTTPS traffic.
For a more versatile solution, our SOCKS5 proxies handle all types of traffic, not just limited to web browsing. This makes them particularly suitable for activities such as P2P sharing and VoIP calls. SOCKS5 proxies offer improved performance and security features and operate on different ports than those used by HTTP/HTTPS, accommodating a broader range of traffic types.

Our system's sub-user feature is a powerful tool designed to enable our users to become resellers, thereby opening up new business opportunities. By leveraging this feature, users are empowered to create and manage numerous sub-users, essentially setting up a network that can be offered to other parties. This feature not only facilitates the expansion of our users' service offerings but also allows them to establish and grow their own businesses. It's a seamless way for users to scale operations, diversify their business models, and explore new revenue streams by reselling access to sub-users.
Users can easily manage their sub-users directly through our streamlined dashboard. This allows for quick adjustments and oversight of sub-user activities, ensuring the smooth operation of their reseller functions.
Sub-UsersAs of September 15, 2025, the legacy API has been deprecated and is no longer supported. Please migrate to the new API to ensure uninterrupted service.
To enable API, you must verify your identity or spend over $200 with us.
https://resi-api.iproyal.com/v1
Authentication is managed via the Authorization header. To ensure secure access, all requests must include this header, followed by your API token, prefixed with the word "Bearer" and a space. The format should be:
Authorization:Bearer <your_api_token>
Your API token is available on the dashboard's Settings page in the 'API' section. Here, you can also reset your token if necessary. Keep it secure and update your applications with the new token if you reset it.
In this part of the guide, we offer clear and thorough instructions for mastering the dashboard's functionalities. This guide is designed to be user-friendly, ensuring that both beginners and seasoned users can efficiently maximize the benefits of our services using the dashboard.
As of September 15, 2025, the legacy API has been deprecated and is no longer supported. Please migrate to the new API to ensure uninterrupted service.
https://apid.iproyal.com/v1/reseller
To authorize your API calls, we validate the X-Access-Token header. You can find and reset this token on the dashboard's Settings page in the 'API' section.
As of September 15, 2025, the legacy API has been deprecated and is no longer supported. Please migrate to the new API to ensure uninterrupted service.
https://apid.iproyal.com/v1/reseller
To authorize your API calls, we validate the X-Access-Token header. You can find and reset this token on the dashboard's Settings page in the 'API' section.
In this part of the guide, we offer clear and thorough instructions for mastering the dashboard's functionalities. This guide is designed to be user-friendly, ensuring that both beginners and seasoned users can efficiently maximize the benefits of our services using the dashboard.
Whether you're looking to automate account maintenance or tailor your proxy settings for specific tasks, the 'Configuration' section offers detailed information on how to customize and manage various settings to enhance your proxy experience. This section is divided into several key subsections, each dedicated to a specific configuration area. These include setting up automatic top-ups to ensure uninterrupted service, accessing proxies effectively, and utilizing advanced features like IP Whitelisting and IP Skipping for refined control over your proxy connections.

In this section, we’ll walk you through the steps for managing domains accessible via our proxies. We recommend reviewing our 'Domain Filtering (previously ‘Allowances’) documentation beforehand to familiarize yourself with the concept.
Domain Filtering (previously Allowances)Navigate to the ‘Residential’ section on the sidebar menu (1), which brings you to the main dashboard for Residential Proxies.
From there, find the 'Domain Filtering' (previously ‘Allowances’) (2) button. Clicking this button enables you to manage and edit domain blocklist and whitelist settings, where you can specify which domains will be accessible via our proxies.
The ‘Restrictions’ (1) section enables you to create a list of domains our proxies will not access. All you need is to provide a URL in the designated field (2) and click the ‘Add’ (3) button. You can modify the list of blocked domains by clicking the ‘Remove’ (4) button next to the entry you want to remove.
Alternatively, you can use the ‘Permissions’ (1) section to create a list of domains that our proxies can access. All you need is to provide a URL in the designated field (2) and click the ‘Add’ button (3). You can modify the list of whitelisted domains by clicking the ‘Remove’ (4) button next to the entry you want to remove.
Note: As long as you have a single domain in your allowed sites list, all other domains will not be accessible via our proxies.
Our Residential Proxies are available in two payment plans - pay-as-you-go and subscription. The subscription feature offers a simple and efficient way for our users to ensure a steady supply of traffic without the hassle of reordering. This option also comes with an exclusive 5% discount.
In this section, we’ll walk you through the steps for managing a subscription.
— Navigate to the 'Residential' (1) section on the sidebar menu, which brings you to the main dashboard for Residential Proxies.
From there, find the 'Subscription' (2) banner to see the current status of your subscription.
If your subscription is active, you will see its details - status (1), next payment date (2), amount of traffic you subscribed to (3), and the price (4). Can click the 'Manage subscription' (5) button to get more information.
On this page, you have several options. You can change your payment method (1), upgrade (2) or cancel (3) your subscription, and get an overview of your subscription history (4).
Clicking the 'Upgrade plan' (1) button will take you to the order placement page.
You will see the pricing and available discounts (1), where you can choose a subscription upgrade, as well as your current subscription details and pricing (2). Add the number of GB (3) you want to add to your subscription, and you’ll see the updated pricing (4). Click the 'Continue' (5) button.
Select the payment method (1) and click the 'Complete order' (2) button.
Clicking the 'Cancel plan' (1) button will bring up a confirmation prompt. Click the 'Yes, cancel' (2) button to cancel your subscription or the 'Not now' (3) button to go back.
If your subscription isn’t activated, you can click the 'Reactivate' (1) button to reactivate it without changing any settings.
Select the payment method (1) and click the 'Complete order' (2) button.
If your subscription is active, you also have the option to add extra traffic without changing the plan. The amount of traffic you can add this way equals your current subscription. To do this, click the 'Quick top-up' button (1).
Select the payment method (1) and click the 'Complete order' (2) button.
There is an option to extend your order, a useful feature as it ensures you keep the IPs you've been provided. There are two methods for extending:
A manual extension where you can go to the orders dashboard and simply click 'Extend';
A subscription. Enabling this option will let you virtually forget about manual extensions, as it automatically renews the order each time it nears expiration.
When extending your order, you also have the option to change your plan. For instance, if you initially had a 90-day plan but only need the proxies for one more day or an additional month, you can adjust the duration accordingly during the extension process. The same option is available with a subscription.
Additionally, you can select the IP addresses you want to extend or subscribe to. This option is useful if you want to downsize your order but still keep specific IPs.
Navigate to the 'ISP' section (1) via the sidebar menu.
Once you locate your order, click 'Extend' (2) to proceed.
In this section, you have the flexibility to select a new plan or continue with the current one (1), while also choosing specific IPs you want to extend (2). Additionally, you can view the 'Expire Date' to determine when the plan is set to expire. Once you’re satisfied with your choices, click 'Continue' (3).
Following this, you will be directed to a familiar page where you can proceed with the extension process and complete the payment for the extension.
To enable subscriptions, please navigate to the 'Order details' section (1) on the ‘Order Configuration’ page.
On this page, you will find a panel that allows you to enable a subscription (2) for this order. You can modify the plan (3) and extend specific proxies (4). Once you’re satisfied with your choices, select your preferred payment method (5) and click ‘Save’ (6) to enable a subscription.
It’s important to note that certain domains will not be accessible via Residential Proxies. The requirements to access them are as follows:
The following domains become available after you confirm your identity on IPRoyal:
Login.yahoo.com
Login.live.com
Linkedin.com
All Ticketswap websites
Banks in this.
The following domains become available after you confirm your identity and spend over $500 on IPRoyal:
All .gov websites
PlayStation websites.
The following domains will remain inaccessible even when you meet these conditions:
Secure.gsb-yourbank.com
Digital.iberiabank.com
Wyndlabs.ai (sharing in grass.io is not allowed)
To access these domains, you need to contact our support team via email or live chat.
In this section of the dashboard, you have the convenience of setting up 'Auto Top-Up' for your account. To get started, toggle the 'Enable auto top-up' switch (1).
When enabled, this feature allows your account to automatically add more GB to your available traffic when it reaches a predetermined level, ensuring uninterrupted service.
You can choose your payment method (1), set the threshold at which the top-up should occur under 'When to add' (2), and specify the amount of GB to be added automatically under 'Amount to add' (3). There's also a field that displays your current balance for clarity, and the option to apply a coupon if you have one (4). Once you have configured your settings, simply click 'Save' (5) to activate the auto top-up feature.
In the 'Mobile Proxies' dashboard, the 'Orders' panel provides a comprehensive view of all your orders, encompassing active, expired, and unpaid ones. This panel is equipped with advanced filtering options, allowing you to sort and view orders based on a variety of criteria beyond just their status. These filters facilitate efficient management and quick access to specific orders. Each order entry includes convenient features to view its details, download an invoice, or extend its duration.
To improve connectivity and reliability when accessing our Residential Proxies from China (or nearby regions), we provide a set of alternative regional entry domains.
These domains function exactly like our standard proxy gateway, but may offer better stability, lower latency, and fewer connection issues for specific geographies.
In this section, we'll walk you through the steps for managing IP skipping lists. We recommend reviewing our 'IP Skipping' documentation beforehand to familiarize yourself with the concept.
Navigate to the 'Residential' section on the sidebar menu (1), which brings you to the main dashboard for Residential Proxies.
From there, find the 'IP skipping' (2) button. Clicking this button enables you to manage and edit your IP skipping settings, where you can specify and manage IP skipping entries.
To begin configuring your order, you first need to access its details page.
First, navigate to the 'ISP' section (1) via the sidebar menu.
Once you locate your order, click on 'Details' (2) to proceed.
Upon entering this page, you will first encounter the 'Proxy details' and 'Order details' toggle (
In this section, we will delve into the creation and configuration of a proxy string. We'll cover how to target specific locations, apply rotation settings, select the appropriate protocol, and more. Additionally, we will demonstrate how to make a request using a proxy.
To begin, it's important to understand that a proxy string comprises four elements: host, port, username, and password. While there are multiple methods to combine these four elements, for the sake of simplicity, we will adopt the format: HOST:PORT:USERNAME:PASSWORD.
Residential proxies utilize the password segment of the string to configure the aforementioned settings. For instance, consider the following proxy string designed to target the state of California in the USA:
As mentioned earlier, the string has four main sections (highlighted in blue), and the last one is labeled 'Password.' This section holds all the configuration details for the proxy.
In the preceding sections, we discussed various configurations that can be applied to a proxy via the proxy string. IP Whitelisting is a feature that streamlines this process by allowing you to preserve your proxy configuration string and link it to a specific IP address. Essentially, this feature enables you to establish a preset configuration and associate it with an IP. Consequently, this eliminates the need for authentication credentials, permitting a direct connection to the proxy using just the HOST:PORT format. This method enhances ease of access while maintaining the security and specificity of your proxy settings.
Whitelisting IPs offers several advantages over the more common username/password authentication.
In the 'Datacenter Proxies' dashboard, the 'Orders' panel provides a comprehensive view of all your orders, encompassing active, expired, and unpaid ones. This panel is equipped with advanced filtering options, allowing you to sort and view orders based on a variety of criteria beyond just their status. These filters facilitate efficient management and quick access to specific orders. Each order entry includes convenient features to view its details, download an invoice, or extend its duration.
To begin configuring your order, you first need to access its details page.
First, navigate to the 'Datacenter' section (1) via the sidebar menu.
Once you locate your order, click on 'Details' (2) to proceed.
Upon entering this page, you will first encounter the 'Proxy details' and 'Order details' toggle (
In this section, we'll walk you through the steps for managing IP whitelists. We recommend reviewing our 'IP Whitelisting' documentation beforehand to familiarize yourself with the concept.
Navigate to the 'Residential' section on the sidebar menu (1), which brings you to the main dashboard for Residential Proxies.
From there, find the 'Whitelist' (2) button. Clicking this button enables you to manage and edit your whitelist settings, where you can specify and manage whitelist entries.
On the configuration page, select the 'Add' option.
Configure your proxy (1). For more information about configuration and input meanings, head to the 'Proxy' section.
To begin configuring your order, you first need to access its details page.
First, navigate to the 'Mobile' section (1) via the sidebar menu.
Once you locate your order, click on 'Details' (2) to proceed.
In the 'ISP proxies' dashboard, the 'Orders' panel provides a comprehensive view of all your orders, encompassing active, expired, and unpaid ones. This panel is equipped with advanced filtering options, allowing you to sort and view orders based on a variety of criteria beyond just their status. These filters facilitate efficient management and quick access to specific orders. Each order entry includes convenient features to view its details, download an invoice, or extend its duration.
In the 'Statistics' section of your Residential Proxies dashboard, you have the ability to monitor and analyze your proxy usage over time. This interactive graph, outlined by the orange dotted border in the image, provides a visual representation of your proxy traffic, which you can further adjust by selecting a specific time period. This can help you understand peak usage times or identify trends. Additionally, you have the option to filter the data by specific websites and choose the units of measurement (such as MB or GB).
For a more detailed review or record-keeping purposes, you can download the report by clicking the 'Download report' button. This tool is essential for managing your proxies effectively and ensuring that your usage aligns with your needs and expectations.
A is an advanced, AI-powered solution built to reliably access and extract public web data – even from sites protected by geo-restrictions, CAPTCHAs, Cloudflare protections, and other anti-bot systems. Unlike , a Web Unblocker automates the entire unblocking process, from smart IP selection to automatic retries, eliminating common scraping obstacles.
The user management feature makes team collaboration easier than ever. As an IPRoyal account owner, you have the ability to create sub-accounts, granting your team members access to the IPRoyal dashboard. This approach improves security, control, and efficiency, making it simple to delegate tasks while still having full oversight of all activities on your account.
Sub-account users can:
Configure and use proxies
Use a unique API token
Authorization header. To ensure secure access, all requests must include this header, followed by your API token, prefixed with the word "Bearer" and a space. The format should be: Authorization:Bearer <your_api_token>
Your API token is available on the dashboard's Settings page in the 'API' section. Here, you can also reset your token if necessary. Keep it secure and update your applications with the new token if you reset it.
X-Access-Token header. You can find and reset this token on the dashboard's Settings page in the 'API' section.
























In this part of the guide, we offer clear and thorough instructions for mastering the dashboard's functionalities. This guide is designed to be user-friendly, ensuring that both beginners and seasoned users can efficiently maximize the benefits of our services using the dashboard.
Here are the most common errors faced by our clients.
Due to the specifics of our hardware and varying cell tower traffic in the US, there may be times when a carrier does not immediately assign a new IP address upon request. In some cases, this process could take up to 30 minutes, and the duration can vary depending on the time of day. Control over the IP pool lies with the ISP, so the frequency of new IP allocation is determined by their policies. For those seeking immediate rotation of US proxies, we advise acquiring additional ports. This allows you to switch proxies within your system whenever a new IP is desired. After switching, you can then request a new IP for the proxy that was previously replaced. If the rotation process encounters a complete stall, our systems are designed to automatically detect and resolve the issue, ensuring you won’t need to take any action.
Proxies that are under ISP’s have their own Rotation per day as constituted by CGNAT Process. The IP you are getting in every rotation you made on the proxy are coming from the ISP itself. For the IP changing more frequently than expected it is due to ISP’s own rotation which we don’t have a control for its own rotation interval.
If you encounter a non-functional proxy, there’s no need for immediate action on your part. Our system is equipped to identify such issues, and our support team is automatically engaged to work on a resolution. However, there may be instances where the system does not detect unstable proxies. In such cases, we advise you to report the proxy through the report button on your dashboard. Our support team will address and resolve the issue within 20 minutes.
It’s completely normal for mobile proxy IPs to be located around the location proxy is operating in. Even cases when ISP give IP from other side of a country is acceptable and no web service will raise any red flag for that. Regular users using mobile phones in the city experience same IP location placements. We do not have control over IPs of proxy, they come straight from ISP.
Our “unlimited” mobile proxy service is designed to cater to a wide range of needs with flexibility and reliability. However, the term “unlimited” comes with the responsibility of fair usage to ensure all our clients enjoy a consistent and quality experience. Excessive data usage poses a risk of our SIM cards being temporarily restricted or permanently banned by our carriers due to their fair usage policies. To mitigate this risk and maintain the high-quality service expected by all our clients, we kindly ask you to consider lowering your data usage or splitting your traffic across multiple proxies. This approach not only adheres to fair usage guidelines but also helps in ensuring your activities can continue without interruption.
IP Rotation and Skipping
Web Unblocker automatically chooses the most effective IP address for each request and skips problematic ones to avoid bans.
Automatic Retries
Web Unblocker retries failed requests with new IPs automatically. Please note we currently allow up to 200 active connections at the same time, so if a site takes longer to unblock, the effective request rate may decrease accordingly.
Geo-location can be set manually at country, city and state level.
Web Unblocker offers on-demand JavaScript rendering using a special flag.
Web Unblocker supports the use of custom HTTP headers, allowing you to tailor requests for specific use cases.
hk.xpt9k2wq.com
Australia
au.xpt9k2wq.com
Simply replace your usual proxy hostname with one of the regional domains.
Here's a cURL example with Singapore entry domain:
curl -v -x http://username123:[email protected]:12321 -L https://ipv4.icanhazip.comNOTE: Geo-routing is not supported using these nodes at the moment.
US
us.xpt9k2wq.com
Europe
eu.xpt9k2wq.com
Singapore
sg.xpt9k2wq.com
Hong Kong
Enhanced security
Improved access control
Abuse prevention
Easier scaling
For further guidance on utilizing this feature, please refer to the 'Whitelisting IPs' subsection located within the 'Dashboard' section of our documentation.
Clicking the 'Edit' button opens a modal window that enables you to add multiple IP ranges, change the list name, and of course, save the list.

Next, you’ll see the 'Formatted Proxy List' section (2).
This displays your proxies in a user-friendly format, providing all the essential details for each proxy connection. You can 'Copy' the list to your clipboard or 'Download List' for offline access. Additionally, you can choose the format and specify how many proxies to display or export. This efficient setup gives you quick access to your proxy details for immediate use.
Next, you'll find a panel designed for managing proxy credentials (3). This feature enables you to change the username and password for either all proxies in the order or for individual proxies.
Finally, you will come across the ‘Whitelisted IPs’ panel (4). This feature allows you to add specific IP addresses to the list and ensure only authorized users have access to your proxies. Users with authorized (or whitelisted) IPs also don’t need to use the proxy username and password for authentication.
By switching to the 'Order details' panel (1) you will get some basic information about the order (2) and the status of your subscription (3). It also gives you the option of extending specific IP addresses in your order (4).
Next, you will come across a panel for adding a note (5). This feature allows you to write something for future reference. Importantly, you will be able to search for the order using the content of your note.

Next, you’ll see the 'Formatted Proxy List' section (2).
This displays your proxies in a user-friendly format, providing all the essential details for each proxy connection. You can 'Copy' the list to your clipboard or 'Download List' for offline access. Additionally, you can choose the format and specify how many proxies to display or export. This efficient setup gives you quick access to your proxy details for immediate use.
Next, you'll find a panel designed for managing proxy credentials (3). This feature enables you to change the username and password for either all proxies in the order or for individual proxies.
Finally, you will come across the ‘Whitelisted IPs’ panel (4). This feature allows you to add specific IP addresses to the list and ensure only authorized users have access to your proxies. Users with authorized (or whitelisted) IPs also don’t need to use the proxy username and password for authentication.
By switching to the 'Order details' panel (1) you will get some basic information about the order (2) and the status of your subscription (3). It also gives you the option of extending specific IP addresses in your order (4).
Next, you will come across a panel for adding a note (5). This feature allows you to write something for future reference. Importantly, you will be able to search for the order using the content of your note.

Create your whitelist entry (3).
Every entry has buttons to manage it (1).
Further down, you will find the formatted proxy list section. This area displays your proxies in a ready-to-use format (2).


Upon entering this page, you will first encounter the 'Proxy details' and 'Order details' toggle (1). The 'Proxy details' page covers the proxy configuration options, while the 'Order details' page offers an order overview and subscription management options.
Next, you will see the 'Proxy Access' panel (2), where all your connection details are conveniently located. From here, you can copy them or download them.
You can also rotate your IP address via the 'Rotate IP' button (3), Rotation link (4), and automatically after a set period (5).
By switching to the 'Order details' panel (1), you will get the basic information about your order (2) and the status of your subscription (3).
Next, you will come across a panel for adding a note (4). This feature allows you to write something for future reference. Importantly, you will be able to search for the order using the content of your note.

Place new orders
Manage subscriptions
Extend existing orders
Create and manage Residential Proxies sub-users
View invoices
Leave suggestions
Customize and delete their account
Sub-account users can not:
Add new team members
Access your Referral Program page
To invite a new user to your account, click on your email (1) in the dashboard and select User management (2) from the drop-down menu.
Click the 'Invite new user' (1) button to add a new managed user to your account.
Enter their first (1) and last (2) name, email address (3) and click the Send (4) button.
Once the process is complete, they can log in to your IPRoyal account using their own credentials. You will see their status (1), last login date (2), and the option to remove (3) their sub-account.
Once an IPRoyal account owner invites you to join their account, you will receive an email. Click the Complete Your Registration (1) button.
Create (1) and confirm (2) your password, then click the Save (3) button.
Once you’re done, you’ll be able to log in to IPRoyal using your email address and password.
IPRoyal currently offers over over 32 million Residential Proxies in over 195 countries. This number is constantly growing, so our clients can rely on fresh proxies for all sorts of tasks.
Highly competitive pricing
We offer some of the lowest prices in the industry with advanced features, high reliability, and .
Exclusive proxy pool
With over 32 million ethically-sourced residential IPs in over 195 countries, we guarantee efficient web scraping, SEO research, data aggregation, social media management, and more.
Precise targeting
Choose proxies from any part of the world (country, state, or city) with a single click and no extra cost.
Pay-as-you-go option
No contracts, no wasted bandwidth, and no monthly limits - you only pay for what you need.
No data expiration
Once you purchase your residential proxy traffic - it’s yours forever. It never expires, so you can use it whenever you want.
24/7 support
With an average response time of just 58 seconds, our skilled team of experts is available around the clock and ready to help you set up and make the most of your proxies.
Advanced session control
Get a new IP on each request or use a sticky session of up to 7 days.
Unlimited simultaneous sessions
No limits and restrictions - use as many connections and scale your operations as needed.
Dual authentication
Username/password and IP whitelisting available for the highest compatibility with scrapers, bots, and other tools.
HTTP(S) and SOCKS5 support
Choose the protocol that suits your needs to get the best results with any usage case.
API access
Integrate our residential proxies into your infrastructure, manage sub-users, and more.
In this section, we'll walk you through the steps for managing sub-users. We recommend reading our 'Sub-Users' introduction beforehand to familiarize yourself with the concept.
Sub-UsersNavigate to the 'Residential' section on the sidebar menu (1), which brings you to the main dashboard for Residential Proxies.
From there, find the 'Sub-Users' (2) button. Clicking on this button will bring you to the sub-users dashboard.
If you haven't created any sub-users yet, you will initially see a brief introduction. By clicking the 'Sub-Users Dashboard' button, you will be directed to the panel where you can create your first sub-user.
The 'Create Sub-User' page features three input fields.
The first is for the sub-user's username (1), which is used to connect to the proxy.
The second field is for setting the password (2).
And the third is 'Assign Traffic' (3). The number entered in this field is the amount of traffic (in GB) that will be deducted from your (the main user's) account and allocated to the sub-user.
After filling out these inputs, click the 'Create' (4) button to finalize the creation of your sub-user.
Congratulations on creating your first sub-user. The image below illustrates the interface you'll encounter following the creation.
It includes:
a button for adding additional sub-users (1);
a display panel indicating your main user’s remaining traffic (2);
a table listing all sub-users with a search feature for easy navigation (3).
Equally crucial are the management buttons (4) adjacent to each sub-user entry, which provide options to create whitelists and generate proxies for them.
At IPRoyal, we offer a wide selection of ISP Proxies across multiple countries, so our clients have access to a variety of options. We also update our proxy network regularly to ensure our clients can always rely on new proxies for all their tasks.
Highly competitive pricing
We offer discounts on the number of purchased proxies, along with additional discounts for longer periods (5% off with the 60-day plan and 10% off with the 90-day plan) advanced features, high reliability, and .
Excellent location coverage
Our proxies are available in many countries on four continents. We’re also constantly adding new locations. If you need a location we don’t offer, contact our support team and we’ll consider adding it.
Premium ISP providers
Regardless of the location you choose, you can rest assured that each IP comes from a premium local internet service provider. We guarantee each IP is 100% residential.
High speeds
With speeds of up to 100Mbps and zero bandwidth limits, we offer a reliable solution even for the most bandwidth-intensive tasks.
HTTPS & SOCKS5 compatible
Choose the protocol that suits your needs to get the best results with any usage case.
24/7 support
With an average response time of just 58 seconds, our skilled team of experts is available around the clock and ready to help you set up and make the most of your proxies.
99.9% uptime
Consistent uptime and reliable connections around the clock enable you to access the resources you need whenever you need them.
State and city targeting
Take advantage of unmatched precision with proxy targeting at the state and city level, empowering you to tailor your operations for specific regions.
Dual authentication
Enhance security by managing proxy access through username and password or IP whitelisting authentication, ensuring only authorized users can connect.
Dedicated IPs
Each ISP proxy is reserved just for you to offer ultimate online privacy and full control over your online activities.
Unlimited traffic & sessions
Maximize your potential with zero traffic and session restrictions for complete online freedom.
Easy integration & API support
Optimize your workflow and simplify operations with a hassle-free user experience.
There is an option to extend your order, a useful feature as it ensures you keep the IPs you've been provided. There are two methods for extending:
A manual extension where you can go to the orders dashboard and simply click 'Extend';
A subscription. Enabling this will let you virtually forget about manual extensions, as it automatically renews the order each time it nears expiration.
When extending your order, you also have the option to change your plan. For instance, if you initially had a 90-day plan but only need the proxies for one more day or an additional month, you can adjust the duration accordingly during the extension process. The same option is available with a subscription.
Additionally, you can select the IP addresses you want to extend or subscribe to. This option is useful if you want to downsize your order but still keep specific IPs.
Navigate to the 'Datacenter' section (1) via the sidebar menu.
Once you locate your order, click on 'Extend' (2) to proceed.
In this section, you have the flexibility to select a new plan or continue with the current one (1), while also choosing specific IPs you want to extend (2). Additionally, you can view the 'Expire Date' to determine when the plan is set to expire. Once you’re satisfied with your choices, click 'Continue' (3).
Following this, you will be directed to a familiar page where you can proceed with the extension process and complete the payment for the extension.
To enable subscriptions, please navigate to the 'Order details' section (1) on the ‘Order Configuration’ page.
On this page, you will find a panel that allows you to enable a subscription (2) for this order. You can modify the plan (3) and extend specific proxies (4). Once you’re satisfied with your choices, select your preferred payment method (5) and click ‘Save’ (6) to enable a subscription.
You can specify a country, city or a US state, from which to access your target website.
You can enable country-level targeting by appending _country- to the password in your proxy credentials.
Example usage for US:
curl -k -v -x http://unblocker.iproyal.com:12323 --proxy-user user:password_country-us -L https://ipv4.icanhazip.comThe value of this parameter is a two-letter country code (ISO 3166-1 alpha-2 format).
You can set more than one country at once.
For city-level targeting, append the _city- key to the password in your proxy credentials. Its value should be the name of the city.
Example:
This feature allows state-level targeting only in US. To target a specific state, append the _state- key to the password in your proxy credentials. Its value should be the name of the state.
Example:
By default, the Web Unblocker attempts to load websites using a simple HTTP request. It checks the HTTP response code, and if the response is successful (e.g., status code 200), the body is returned to the client.
However, some websites return a 200 OK status while still serving a placeholder or error message indicating that JavaScript is disabled. In such cases, no actual page content is rendered or visible.
To handle this, the web unblocker offers on-demand JavaScript rendering using a special render flag. This instructs the unblocker to fully render the page in a headless browser before returning the response, allowing access to JavaScript-dependent content.
render FlagYou can enable rendering by appending _render-1 to the password in your proxy credentials. For example:
Use Cases
Accessing sites that require JavaScript to display content
Bypassing anti-bot pages that rely on JavaScript
Scraping modern web apps with dynamic front-ends
Notes
Rendering may increase response times due to the overhead of launching a headless browser.
Use rendering only when needed, as most sites can still be accessed with basic HTTP requests.
When activated, the 'High-End Pool' option grants you access to the swiftest and most reliable proxies in our selection. Please be aware, however, that the trade-off for this enhanced quality is a smaller pool of available proxies than what is typically accessible.
To enable this feature, you will need to add the _streaming- key with value 1.
Example:
The IP skipping feature enables you to compile multiple lists of IP ranges that will be automatically bypassed during the IP resolution process for your proxy connection.
To enable this feature you will need to add the _skipipslist- key, value of the key is ULID (id) of the generated list.
Example:
At IPRoyal, we offer a wide selection of across multiple countries, so our clients have access to a variety of options. We also update our proxy network regularly to ensure our clients can always rely on new proxies for all their tasks.
Highly competitive pricing
There is an option to extend your order, a useful feature as it ensures you keep the IPs you've been provided. There are two methods for extending:
A manual extension where you can go to the orders dashboard and simply click 'Extend';
A subscription. Enabling this will let you virtually forget about manual extensions, as it automatically renews the order each time it nears expiration.
When extending your order, you also have the option to change your plan. For instance, if you initially had a 90-day plan but only need the proxies for one more day or an additional month, you can adjust the duration accordingly during the extension process. The same option is available with a subscription.
Excellent location coverage
Our proxies are available in many countries on four continents. We’re also constantly adding support for new locations.
High speeds
With 100 Mbps speed available and zero bandwidth limits, we offer a reliable solution even for the most bandwidth-intensive tasks.
HTTPS & SOCKS5 compatible
Choose the protocol that suits your needs to get the best results with any usage case.
24/7 support
With an average response time of just 58 seconds, our skilled team of experts is available around the clock and ready to help you set up and make the most of your proxies.
Versatile plans
Being able to choose the exact number of proxies makes our services more accessible to a broader range of users who don’t have to commit to large packages.
Dedicated IPs
Each datacenter proxy is reserved just for you to offer ultimate online privacy and full control over your online activities.
State and city targeting
Take advantage of unmatched precision with proxy targeting at the state and city level, empowering you to tailor your operations for specific regions.
Dual authentication
Enhance security by managing proxy access through username and password or IP whitelisting authentication, ensuring only authorized users can connect.
Unlimited traffic & sessions
Maximize your potential with zero traffic and session restrictions for complete online freedom.
99.9% uptime
Consistent uptime and reliable connections around the clock enable you to access the resources you need whenever you need them.
Easy integration & API support
Optimize your workflow and simplify operations with a hassle-free user experience.
























curl -v -x http://username123:[email protected]:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-br_streaming-1';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>For further information on how to create and manage these lists, please refer to the 'IP Skipping' subsection located within the 'Dashboard' section of our documentation.
curl -v -x http://username123:password321_country-br_skipipslist-01GRBHR1DMBFRH8VW7APEWD5BQ@geo.iproyal.com:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-br_skipipslist-01GRBHR1DMBFRH8VW7APEWD5BQ';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>curl -k -v -x http://unblocker.iproyal.com:12323 --proxy-user user:password_country-us_city-chicago -L https://ipv4.icanhazip.comcurl -x http://username:[email protected]:12323 https://example.com -k -vUser-Agent
Accept-Language
Accept-Encoding
Custom headers (e.g., X-My-Header)
Other headers not listed as blocked
Example usage:
If your client:
Uses User-Agent: curl/... or User-Agent: wget/...
Or sends no User-Agent at all
Then the unblocker will replace it with a randomized browser User-Agent, such as:
The unblocker removes these headers:
Connection
Keep-Alive
Proxy-Authenticate
Proxy-Authorization
Proxy-Connection
TE
Trailer
Transfer-Encoding
Upgrade
X-Render-JS
When Chromium is triggered by the unblocker, it additionaly ignores the following headers:
Content-Length
Host
Cookie2
Keep-Alive
Set-Cookie
Origin
Referer
Any Sec-Fetch-* header
Chromium will also override the Accept header with the following:
So you may expect this even you explicitly pass “application/json”.
See Chromium documentation for more information.
import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-br_streaming-1';
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-br_streaming-1';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth,
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-br_skipipslist-01GRBHR1DMBFRH8VW7APEWD5BQ'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-br_skipipslist-01GRBHR1DMBFRH8VW7APEWD5BQ';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();curl -k -v -x http://unblocker.iproyal.com:12323 --proxy-user user:password_country-us_state-iowa -L https://ipv4.icanhazip.comcurl -x <http://unblocker.example> \\
--proxy-user user:pass \\
-H 'Cookie: user=hello; theme=dark' \\
-H 'X-My-Header: custom-value' \\
<https://httpbin.org/headers>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/134.0.0.0 Safari/537.3Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
image/avif,image/webp,image/apng,*/*;q=0.8Navigate to the 'Mobile' section (1) via the sidebar menu.
Once you locate your order, click on 'Extend' (2) to proceed.
In this section, you have the flexibility to select a new plan or continue with the current one (1). Additionally, you can view the 'Expire Date' to determine when the plan is set to expire (2).
Following this, you will be directed to a familiar page where you can proceed with the extension process and complete the payment for the extension.
To enable subscriptions, please navigate to the 'Order details' (1) section on the 'Order Configuration” page.
On this page, you will find a panel that allows you to enable a subscription (2) for this order. You can modify the plan (3) here. Once you’re satisfied with your choices, select your preferred payment method (4) and click 'Save' (5) to enable a subscription.
In the realm of proxy sessions, we offer two distinct types of rotation: 'Sticky' and 'Randomize'. Each type serves a different purpose, catering to the varying needs of our users.
This option allows you to maintain a consistent proxy for the duration of your session. With sticky sessions, you can configure a 'lifetime' parameter, which determines how long the same proxy will be used before it switches to a new one. This is particularly useful for tasks that require a sustained connection to the same IP address, such as maintaining a consistent session while accessing web resources that have session-based authentication or tracking.
The _session- key instructs our routing system to either create or resolve a unique session for the connection. The value assigned to this key must be a random alphanumeric string, precisely 8 characters in length. This ensures the uniqueness and integrity of the session.
The _lifetime- key directs the router regarding the duration for which the session remains valid. The minimum duration is set at 1 second, and the maximum extends to 7 days. It is crucial to note the format here: only one unit of time can be specified. This parameter plays a pivotal role in defining the operational span of a sticky session, balancing between session stability and security needs.
Examples:
Randomize sessions provide a new proxy with each request. This means that every time you make a request, it comes from a different IP address. This approach is ideal for tasks that require a high level of anonymity and reduced traceability, such as web scraping or accessing content without revealing a consistent identity.
To use this type of rotation, you don't need to add anything to the proxy string.
Note: To reduce IP rotation and improve performance of your proxies, add the _forcerandom-1 tag to your proxy string. This will increase the pool of selected locations.
In this section, we'll show practical examples of using the proxy string we've created. We'll focus on setting up HTTP/HTTPS and SOCKS5 connections, illustrated through examples in various programming languages.
Our ISP proxies are compatible with both UDP and TCP connections.
Keep in mind that the ports will differ depending on the protocol (HTTP/SOCKS5). To choose between HTTP or SOCKS5 proxies, please refer to the 'Formatted Proxy List' panel within the 'Order Configuration' section. Order Configuration
IPRoyal offers a wide selection of Mobile Proxies in multiple countries, so our clients always have plenty of options for their needs. We update our mobile proxy server network regularly to ensure a constant supply of fresh and reliable IPs for all sorts of tasks. You can check the list of available countries and locations on our website.
Highly competitive pricing
We offer discounts for longer periods (5% off with the 60-day plan and 10% off with the 90-day plan) advanced features, high reliability, and .
Versatile plans
Our proxies are available in four plans - from 1 to 90 days. Being able to choose the duration makes our services more accessible to a broader range of users who don’t have to commit to large packages.
Real mobile IPs
All our mobile proxies come from residential mobile network pools - you’re renting a physical mobile device with a 3G/4G/5G SIM card.
24/7 support
With an average response time of just 58 seconds, our skilled team of experts is available around the clock and ready to help you set up and make the most of your proxies.
Instant IP rotation
The rotation interval depends on the plan you purchased. You can rotate your IP address manually once every 6 minutes with the 1-day plan and once manually or automatically every 6 minutes with the 30, 60, and 90-day plans. If you try to do it too often, you’ll get a different notification and your IP address won’t change.
Access to the entire IP pool
By renting a mobile proxy, you can switch between all available IPs in your chosen location for full control over your online activities.
Unlimited traffic & sessions
Maximize your potential with zero traffic and session restrictions for complete online freedom.
High compatibility
Manage social media accounts, gather data, perform SEO research, automate processes, and more - you can use our mobile proxies for any site.
When enabled, this option instructs our router to skip static proxies.
To enable this feature, you will need to add the _skipispstatic- key with value 1.
Example:
curl -v -x http://username123:[email protected]:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-br_skipispstatic-1';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
In this section, we'll show practical examples of using the proxy string we've created. We'll focus on setting up HTTP/HTTPS and SOCKS5 connections, illustrated through examples in various programming languages.
Our Datacenter proxies are compatible with both UDP and TCP connections.
Keep in mind that the ports will differ depending on the protocol (HTTP/SOCKS5). To choose between HTTP or SOCKS5 proxies, please refer to the 'Formatted Proxy List' panel within the 'Order Configuration' section.



curl -v -x http://username123:password321_country-br_session-sgn34f3e_lifetime-10m@geo.iproyal.com:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-br_session-sgn34f3e_lifetime-10m';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>curl -v -x http://191.116.125.248:12323 --proxy-user aea1bcf5cb3:e8c6a622fe -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = '191.116.125.248:12323';
$proxyAuth = '1aea1bcf5cb3:e8c6a622fe';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>curl -v --socks5 191.116.125.248:12324 --proxy-user aea1bcf5cb3:e8c6a622fe -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = '191.116.125.248:12324';
$proxyAuth = '1aea1bcf5cb3:e8c6a622fe';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Example response:
curl -X GET https://resi-api.iproyal.com/v1/me \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/me';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-br_session-sgn34f3e_lifetime-10m'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-br_session-sgn34f3e_lifetime-10m';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();const axios = require('axios');
const url = 'https://ipv4.icanhazip.com';
const proxyOptions = {
host: '191.116.125.248',
port: 12323,
auth: {
username: '1aea1bcf5cb3',
password: 'e8c6a622fe'
}
};
axios.get(url, { proxy: proxyOptions })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
proxy = '191.116.125.248:12323'
proxy_auth = '1aea1bcf5cb3:e8c6a622fe'
proxies = {
'http': f'http://{proxy_auth}@{proxy}',
'https': f'http://{proxy_auth}@{proxy}'
}
response = requests.get(url, proxies=proxies)
print(response.text)const axios = require('axios');
const SocksProxyAgent = require('socks-proxy-agent');
const url = 'https://ipv4.icanhazip.com';
const socksProxy = 'socks5://1aea1bcf5cb3:[email protected]:12324';
const agent = new SocksProxyAgent(socksProxy);
axios.get(url, { httpAgent: agent, httpsAgent: agent })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
socks5_proxy = 'socks5://1aea1bcf5cb3:[email protected]:12324'
proxies = {
'http': socks5_proxy,
'https': socks5_proxy
}
response = requests.get(url, proxies=proxies)
print(response.text)import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-br_skipispstatic-1'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-br_skipispstatic-1';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/me'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/me';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/me";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
meURL = "https://resi-api.iproyal.com/v1/me"
)
func main() {
req, err := http.NewRequest(http.MethodGet, meURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/me";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"available_traffic": 32.6,
"subusers_count": 13,
"residential_user_hash": "01H7YCG0R9GYY1YCPS2S4QA6WB"
}curl -v -x http://username123:[email protected]:12321 -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = 'geo.iproyal.com:12321';
$proxyAuth = 'username123:password321_country-us_state-california';
$ch = curl_init();
curl_setopt
curl -v -x socks5://username123:[email protected]:32325 -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = 'geo.iproyal.com:32325';
$proxyAuth = 'username123:password321_country-us_state-california';
$ch = curl_init();
curl_setopt
curl -v -x http://45.12.106.20:12323 --proxy-user 1a725103c093:d510a22638 -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = '45.12.106.20:12323';
$proxyAuth = '1a725103c093:d510a22638';
$ch = curl_init();
curl_setopt(
curl -v --socks5 45.12.106.20:12324 --proxy-user 1a725103c093:d510a22638 -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = '45.12.106.20:12324';
$proxyAuth = '1a725103c093:d510a22638';
$ch = curl_init();
curl_setopt(
const axios = require('axios');
const url = 'https://ipv4.icanhazip.com';
const proxyOptions = {
host: 'geo.iproyal.com',
port: 12321,
auth: {
username: 'username123',
password: 'password321_country-us_state-california'
}
};
axios.get(url, { proxy: proxyOptions })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
proxy = 'geo.iproyal.com:12321'
proxy_auth = 'username123:password321_country-us_state-california'
proxies = {
'http': f'http://{proxy_auth}@{proxy}',
'https': f'http://{proxy_auth}@{proxy}'
}
response = requests.get(url, proxies=proxies)
print(response.text)const axios = require('axios');
const SocksProxyAgent = require('socks-proxy-agent');
const url = 'https://ipv4.icanhazip.com';
const socksProxy = 'socks5://username123:[email protected]:32325';
const agent = new SocksProxyAgent(socksProxy);
axios.get(url, { httpAgent: agent, httpsAgent: agent })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
socks5_proxy = 'socks5://username123:[email protected]:32325'
proxies = {
'http': socks5_proxy,
'https': socks5_proxy
}
response = requests.get(url, proxies=proxies)
print(response.text)const axios = require('axios');
const url = 'https://ipv4.icanhazip.com';
const proxyOptions = {
host: '45.12.106.20',
port: 12323,
auth: {
username: '1a725103c093',
password: 'd510a22638'
}
};
axios.get(url, { proxy: proxyOptions })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
proxy = '45.12.106.20:12323'
proxy_auth = '1a725103c093:d510a22638'
proxies = {
'http': f'http://{proxy_auth}@{proxy}',
'https': f'http://{proxy_auth}@{proxy}'
}
response = requests.get(url, proxies=proxies)
print(response.text)const axios = require('axios');
const SocksProxyAgent = require('socks-proxy-agent');
const url = 'https://ipv4.icanhazip.com';
const socksProxy = 'socks5://1a725103c093:[email protected]:12324';
const agent = new SocksProxyAgent(socksProxy);
axios.get(url, { httpAgent: agent, httpsAgent: agent })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
socks5_proxy = 'socks5://1a725103c093:[email protected]:12324'
proxies = {
'http': socks5_proxy,
'https': socks5_proxy
}
response = requests.get(url, proxies=proxies)
print(response.text)Example response:
curl -X GET https://resi-api.iproyal.com/v1/web-unblocker/me \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/web-unblocker/me';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/web-unblocker/me'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/web-unblocker/me';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/web-unblocker/me";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/web-unblocker/me"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/web-unblocker/me";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"available_requests": 1000,
"web_unblocker_user_hash": "01H7YCG0R9GYY1YCPS2S4QA6WB"
}curl -X GET https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt
In this section, we'll show practical examples of using the proxy string we've created. We'll focus on setting up HTTP/HTTPS and SOCKS5 connections, illustrated through examples in various programming languages.
Keep in mind that the ports will differ depending on the protocol (HTTP/SOCKS5). To choose between HTTP or SOCKS5 proxies, please refer to the 'Proxy access' panel within the 'Order Configuration' section. Order Configuration
import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/web-unblocker/access/generate-proxy";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"proxy_string": "unblocker.iproyal.com:12323:enc321316127:h12BPqawfq1BBrk"
}key
String
Key to rotate IP
curl -X POST "https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/<your_key>" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$key = '<your_key>';
$url = "https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/$key";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>residential_user_hashes
Array
Array of user hashes to reset sessions
curl -X DELETE https://resi-api.iproyal.com/v1/sessions \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"residential_user_hashes":["hash1","hash2","hash3"]}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/sessions';
$residential_user_hashes = ['hash1', 'hash2', 'hash3'];
$data = json_encode(['residential_user_hashes' => $residential_user_hashes]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$headers = [
"Authorization: Bearer $api_token",
"Content-Type: application/json"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>curl -v -x http://gb.4g.iproyal.com:7001 --proxy-user IqcDPwX:Cz6hB219pDaCgEG -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = 'gb.4g.iproyal.com:7001';
$proxyAuth = 'IqcDPwX:Cz6hB219pDaCgEG';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>curl -v --socks5 gb.4g.iproyal.com:3008 --proxy-user IqcDPwX:Cz6hB219pDaCgEG -L https://ipv4.icanhazip.com<?php
$url = 'https://ipv4.icanhazip.com';
$proxy = 'gb.4g.iproyal.com:3008';
$proxyAuth = 'IqcDPwX:Cz6hB219pDaCgEG';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Example response:
curl -X GET "https://apid.iproyal.com/v1/reseller/balance" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/balance";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
key = '<your_key>'
url = f'https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/{key}'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const key = '<your_key>';
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/4g/rotate-ip/${key}`,
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String key = "<your_key>";
String urlString = String.format("https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/%s", key);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("Post request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
key = "<your_key>"
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/%s", key)
req, err := http.NewRequest(http.MethodPost, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string key = "<your_key>";
string url = $"https://apid.iproyal.com/v1/reseller/orders/4g/rotate-ip/{key}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.PostAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/sessions'
residential_user_hashes = ['hash1', 'hash2', 'hash3']
data = {'residential_user_hashes': residential_user_hashes}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.delete(url, headers=headers, json=data)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/sessions';
const residentialUserHashes = ['hash1', 'hash2', 'hash3'];
const data = JSON.stringify({ residential_user_hashes: residentialUserHashes });
const options = {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${apiToken}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(url, options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String url = "https://resi-api.iproyal.com/v1/sessions";
String requestBody = "{\"residential_user_hashes\": [\"hash1\", \"hash2\", \"hash3\"]}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiToken)
.header("Content-Type", "application/json")
.header("X-HTTP-Method-Override", "DELETE")
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response);
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
sessionsURL = "https://resi-api.iproyal.com/v1/sessions"
)
func main() {
data := map[string]interface{}{
"residential_user_hashes": []string{"hash1", "hash2", "hash3"},
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodDelete, sessionsURL, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/sessions";
string[] residentialUserHashes = { "hash1", "hash2", "hash3" };
var data = new
{
residential_user_hashes = residentialUserHashes
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
var jsonData = JsonConvert.SerializeObject(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.DeleteAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}const axios = require('axios');
const url = 'https://ipv4.icanhazip.com';
const proxyOptions = {
host: 'gb.4g.iproyal.com',
port: 7001,
auth: {
username: 'IqcDPwX',
password: 'Cz6hB219pDaCgEG'
}
};
axios.get(url, { proxy: proxyOptions })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
proxy = 'gb.4g.iproyal.com:7001'
proxy_auth = 'IqcDPwX:Cz6hB219pDaCgEG'
proxies = {
'http': f'http://{proxy_auth}@{proxy}',
'https': f'http://{proxy_auth}@{proxy}'
}
response = requests.get(url, proxies=proxies)
print(response.text)const axios = require('axios');
const SocksProxyAgent = require('socks-proxy-agent');
const url = 'https://ipv4.icanhazip.com';
const socksProxy = 'socks5://IqcDPwX:[email protected]:3008';
const agent = new SocksProxyAgent(socksProxy);
axios.get(url, { httpAgent: agent, httpsAgent: agent })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});import requests
url = 'https://ipv4.icanhazip.com'
socks5_proxy = 'socks5://IqcDPwX:[email protected]:3008'
proxies = {
'http': socks5_proxy,
'https': socks5_proxy
}
response = requests.get(url, proxies=proxies)
print(response.text)const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/balance',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/balance";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/balance"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/balance";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JObject.Parse(responseText);
Console.WriteLine(jsonResponse);
}
}
}import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/balance'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())884.05const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET'
Example response:
curl -X GET "https://apid.iproyal.com/v1/reseller/products" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET'
Example response:
curl -X GET "https://apid.iproyal.com/v1/reseller/products" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/products'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/products";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/products"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/products";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"id": 9,
"name": "Static Residential",
"plans": [
{
"id": 4,
"name": "30 Days",
"price": 2,
"min_quantity": 5,
"max_quantity": 100000
},
...
],
"locations": [
{
"id": 51,
"name": "Australia",
"out_of_stock": false,
"available_proxies_count": 1142,
"child_locations": []
},
...
],
"questions": [
{
"id": 5,
"text": "On which website do you plan to use them?",
"is_required": false
}
],
"quantity_discounts": [
{
"quantity_from": 99,
"discount_percent": 5
},
...
]
},
...
]
}import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/products'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/products',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/products";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/products"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/products";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}
{
"data": [
{
"id": 9,
"name": "Static Residential",
"plans": [
{
"id": 4,
"name": "30 Days",
"price": 2,
"min_quantity": 5,
"max_quantity": 100000
},
...
],
"locations": [
{
"id": 51,
"name": "Australia",
"out_of_stock": false,
"child_locations": []
},
...
],
"questions": [
{
"id": 5,
"text": "On which website do you plan to use them?",
"is_required": false
}
],
"quantity_discounts": [
{
"quantity_from": 99,
"discount_percent": 5
},
...
]
},
...
]
}GET /balance
Returns the user's balance.
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/balance" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/balance";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER
Example response:
GET /cards
Example request:
Example response:
The Web Unblocker functions as an HTTP proxy and performs a Man-in-the-Middle (MITM) operation on traffic. This allows it to intercept and modify requests in order to bypass anti-scraping protections.
Due to the MITM mechanism and the required SSL handling, it is not recommended to use the unblocker in browsers or with tools like Playwright.
By the nature of the tool, we currently support only GET requests.
Example requests:
curl -k -v -x http://unblocker.iproyal.com:12323 --proxy-user username:password -L https://ipv4.icanhazip.com<?php
declare(strict_types=1);
$url = 'https://ipv4.icanhazip.com';
$proxy = 'http://unblocker.iproyal.com:12323';
$proxyAuth = 'username:password';
$ch =
To use the Web Unblocker, you must disable HTTPS certificate verification.
Error codes, often HTTP status codes, indicate problems encountered while accessing a website.
Common errors include 404 (Not Found), 403 (Forbidden), 502 (Bad Gateway), and 503 (Service Unavailable). These codes help identify whether the issue is with the client (4xx), the server (5xx), or a redirection (3xx).
import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/balance'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())import requests
url = 'https://ipv4.icanhazip.com'
proxy = 'unblocker.iproyal.com:12323'
proxy_auth = 'username:password'
proxies = {
'http': f'http://{proxy_auth}@{proxy}',
'https': f'http://{proxy_auth}@{proxy}'
}
response = requests.get(
url,
proxies=proxies,
verify=False,
allow_redirects=True,
timeout=30,
)
print(response.text)const { fetch, ProxyAgent } = require('undici');
const url = 'https://ipv4.icanhazip.com';
const client = new ProxyAgent(
'http://username:[email protected]:12323'
);
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
(async () => {
try {
const response = await fetch(url, {
redirect: 'follow',
dispatcher: client,
headers: {
'user-agent': 'undici-proxy-test'
}
});
const text = await response.text();
if (!response.ok) {
console.error(`HTTP ${response.status} ${response.statusText}`);
}
console.log(text.trim());
} catch (error) {
console.error('Fetch failed:', error);
}
})();import javax.net.ssl.*;
import java.io.*;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
public class Main {
private static final String PROXY_HOST = "unblocker.iproyal.com";
private static final int PROXY_PORT = 12323;
private static final String USERNAME = "username";
private static final String PASSWORD = "password";
private static final String TARGET_HOST = "ipv4.icanhazip.com";
private static final int TARGET_PORT = 443;
private static final boolean INSECURE_TRUST_ALL = true;
public static void main(String[] args) {
try {
System.out.println(fetchIpThroughProxy());
} catch (Exception e) {
System.err.println("ERROR: " + e.getClass().getSimpleName() + ": " + e.getMessage());
}
}
private static String fetchIpThroughProxy() throws Exception {
final String basic = Base64.getEncoder()
.encodeToString((USERNAME + ":" + PASSWORD).getBytes(StandardCharsets.ISO_8859_1));
try (Socket proxy = new Socket()) {
proxy.connect(new InetSocketAddress(PROXY_HOST, PROXY_PORT), 15_000);
proxy.setSoTimeout(15_000);
try (var out = new BufferedWriter(new OutputStreamWriter(proxy.getOutputStream(), StandardCharsets.ISO_8859_1));
var in = new BufferedInputStream(proxy.getInputStream())) {
out.write("CONNECT " + TARGET_HOST + ":" + TARGET_PORT + " HTTP/1.1\r\n");
out.write("Host: " + TARGET_HOST + ":" + TARGET_PORT + "\r\n");
out.write("Proxy-Authorization: Basic " + basic + "\r\n");
out.write("Proxy-Connection: Keep-Alive\r\n\r\n");
out.flush();
final String status = readLine(in);
if (status == null || !status.startsWith("HTTP/1.1 200")) {
throw new IOException("CONNECT failed: " + status);
}
drainHeaders(in);
SSLSocket ssl = (SSLSocket) sslFactory().createSocket(proxy, TARGET_HOST, TARGET_PORT, true);
SSLParameters params = ssl.getSSLParameters();
params.setServerNames(java.util.List.of(new SNIHostName(TARGET_HOST)));
ssl.setSSLParameters(params);
ssl.startHandshake();
try (var httpsOut = new BufferedWriter(new OutputStreamWriter(ssl.getOutputStream(), StandardCharsets.ISO_8859_1));
var httpsIn = new BufferedInputStream(ssl.getInputStream())) {
httpsOut.write("GET / HTTP/1.1\r\n");
httpsOut.write("Host: " + TARGET_HOST + "\r\n");
httpsOut.write("User-Agent: JavaRawProxy\r\n");
httpsOut.write("Connection: close\r\n\r\n");
httpsOut.flush();
drainHeaders(httpsIn);
return readBody(httpsIn).trim();
}
}
}
}
private static SSLSocketFactory sslFactory() throws Exception {
if (!INSECURE_TRUST_ALL) return (SSLSocketFactory) SSLSocketFactory.getDefault();
TrustManager[] trustAll = new TrustManager[]{ new X509TrustManager() {
public void checkClientTrusted(java.security.cert.X509Certificate[] c, String a) {}
public void checkServerTrusted(java.security.cert.X509Certificate[] c, String a) {}
public java.security.cert.X509Certificate[] getAcceptedIssuers() { return new java.security.cert.X509Certificate[0]; }
}};
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(null, trustAll, new java.security.SecureRandom());
return ctx.getSocketFactory();
}
private static void drainHeaders(InputStream in) throws IOException {
String line;
while ((line = readLine(in)) != null && !line.isEmpty()) {}
}
private static String readBody(InputStream in) throws IOException {
ByteArrayOutputStream buf = new ByteArrayOutputStream();
byte[] tmp = new byte[4096];
int n;
while ((n = in.read(tmp)) != -1) buf.write(tmp, 0, n);
return buf.toString(StandardCharsets.ISO_8859_1);
}
private static String readLine(InputStream in) throws IOException {
StringBuilder sb = new StringBuilder();
int prev = -1, cur;
while ((cur = in.read()) != -1) {
if (prev == '\r' && cur == '\n') { sb.setLength(sb.length() - 1); break; }
sb.append((char) cur); prev = cur;
}
return (sb.length() == 0 && cur == -1) ? null : sb.toString();
}
}package main
import (
"crypto/tls"
"encoding/base64"
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
proxyUser := "username"
proxyPass := "password"
proxyStr := "http://unblocker.iproyal.com:12323"
target := "https://ipv4.icanhazip.com"
proxyURL, err := url.Parse(proxyStr)
if err != nil {
panic(err)
}
proxyURL.User = url.UserPassword(proxyUser, proxyPass)
basic := "Basic " + base64.StdEncoding.EncodeToString([]byte(proxyUser+":"+proxyPass))
tr := &http.Transport{
Proxy: http.ProxyURL(proxyURL),
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
ProxyConnectHeader: http.Header{
"Proxy-Authorization": []string{basic},
},
}
client := &http.Client{
Transport: tr,
Timeout: 30 * time.Second,
}
resp, err := client.Get(target)
if err != nil {
fmt.Println("Request error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Printf("HTTP %d\n%s\n", resp.StatusCode, string(body))
}curl -X GET "https://apid.iproyal.com/v1/reseller/cards" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$url = "https://apid.iproyal.com/v1/reseller/cards";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
A gateway or proxy server failed to get a valid response.
503
The server is overloaded or down.
504
The server took too long to respond.
Response Code
Explanation
200
Request was successful.
301/302
The page redirected.
403
The request was blocked.
404
The URL doesn’t exist.
429
Rate limit is reached. We currently allow up to 200 active connections at the same time.
500
The target server had a problem.
502
const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/balance',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/balance";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/balance"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Printf(string(responseBody))
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/balance";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}884.05import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/cards'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/cards`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
int orderId = 12345;
String urlString = String.format("https://apid.iproyal.com/v1/reseller/cards");
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/cards")
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/cards";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"id": 2,
"provider": "stripe",
"custom_name": null,
"payment_method": "card",
"card_type": "visa",
"currency": "USD",
"last_four_digits": "1234",
"expiry_date": "2026/01",
"update_url": null,
"cancel_url": null,
"products_with_order_ids": [],
"has_royal_auto_extend_enabled": false,
"updated_at": "2025-04-11T14:06:28.000000Z"
},
]
}using System.Net;
using System.Net.Sockets;
using System.Net.Security;
using System.Text;
class Program
{
static async Task Main()
{
var url = new Uri("https://ipv4.icanhazip.com");
var proxy = new Uri("http://unblocker.iproyal.com:12323");
const string proxyUser = "username";
const string proxyPass = "password";
using var client = CreateHttpClient(proxy, proxyUser, proxyPass);
var ip = (await client.GetStringAsync(url)).Trim();
Console.WriteLine(ip);
}
private static HttpClient CreateHttpClient(Uri proxyUri, string user, string pass)
{
var handler = new SocketsHttpHandler
{
AllowAutoRedirect = true,
AutomaticDecompression = DecompressionMethods.All,
SslOptions = new SslClientAuthenticationOptions
{
RemoteCertificateValidationCallback = static (_, _, _, _) => true
},
ConnectCallback = async (ctx, ct) =>
{
var tcp = new TcpClient();
await tcp.ConnectAsync(proxyUri.Host, proxyUri.Port);
var stream = tcp.GetStream();
var auth = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{user}:{pass}"));
string host = ctx.DnsEndPoint.Host;
int port = ctx.DnsEndPoint.Port;
var request =
$"CONNECT {host}:{port} HTTP/1.1\r\n" +
$"Host: {host}:{port}\r\n" +
$"Proxy-Authorization: Basic {auth}\r\n" +
"\r\n";
var bytes = Encoding.ASCII.GetBytes(request);
await stream.WriteAsync(bytes, 0, bytes.Length, ct);
await stream.FlushAsync(ct);
using var reader = new StreamReader(stream, Encoding.ASCII, detectEncodingFromByteOrderMarks: false, bufferSize: 4096, leaveOpen: true);
var status = await reader.ReadLineAsync();
if (status is null || !status.Contains(" 200 "))
throw new IOException($"Proxy CONNECT failed: {status}");
while (!string.IsNullOrEmpty(await reader.ReadLineAsync())) { }
return stream;
}
};
var client = new HttpClient(handler)
{
Timeout = TimeSpan.FromSeconds(30)
};
client.DefaultRequestVersion = HttpVersion.Version11;
return client;
}
}Example response:
GET /cards
Example request:
curl -X GET "https://apid.iproyal.com/v1/reseller/cards" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$url = "https://apid.iproyal.com/v1/reseller/cards";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER
Example response:
curl -X GET "https://apid.iproyal.com/v1/reseller/balance" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/balance";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/balance',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/balance";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/balance"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/balance";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JObject.Parse(responseText);
Console.WriteLine(jsonResponse);
}
}
}import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/cards'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/cards`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
int orderId = 12345;
String urlString = String.format("https://apid.iproyal.com/v1/reseller/cards");
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/cards")
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/cards";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/balance'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())884.05{
"data": [
{
"id": 2,
"provider": "stripe",
"custom_name": null,
"payment_method": "card",
"card_type": "visa",
"currency": "USD",
"last_four_digits": "1234",
"expiry_date": "2026/01",
"update_url": null,
"cancel_url": null,
"products_with_order_ids": [],
"has_royal_auto_extend_enabled": false,
"updated_at": "2025-04-11T14:06:28.000000Z"
},
]
}GET /access/availability/static-residential
Returns a list of countries with available proxies count.
To use this feature, the admin must enable it. This feature requires a minimum total spend of $10000.
Example request:
Example response:
POST /orders/proxies/change-credentials
Body Parameters
Example request:
Location targeting is arguably the most crucial aspect of configuring a proxy. Users frequently need to access a proxy server in a specific location for various purposes. IPRoyal offers extensive possibilities in this regard, enabling users to target a region, country, state, or city and even a specific internet service provider (ISP) within that location. We will explore these options in greater detail in the subsequent paragraphs, focusing on the comprehensive location-targeting capabilities provided by IPRoyal within this section.
_region- is the key for region configuration. Adding this value will tell our router to filter proxies that are located in this region.
Example:
_country- is the key for country configuration. The value of this parameter is a two letter country code ().
You can select more than one country. When resolving a proxy with this configuration, our router will randomly select one of the countries you had set as a value for the country key.
Examples:
_city- is the key to target a city. The value should be a name of the city.
Additionally, it's essential to specify the country when targeting a specific city, as multiple countries may have cities with the same name.
Example:
_state- is used to target a state in the US. The value should be the name of the state.
Be sure to select the US as a country.
Example:
_isp- is used to target a specific ISP (Internet service provider) in a location. The value should be a concatenated name of the provider.
Be sure to chain it to a city. A single ISP is often present in many cities or even countries.
Example:
random_password
Boolean
Should we assign a random password
is_reset
Boolean
Should we assign a random username and password
order_id
Integer
Order id
proxies
Array
List of proxies
username
String
Proxy connection username
password
String
Proxy connection password
curl -X GET "https://apid.iproyal.com/v1/reseller/access/availability/static-residential" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/access/availability/static-residential";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>asiapacific
europe
middleeast
northamerica
southlatinamerica
curl -v -x http://username123:[email protected]:12321 -L https://google.comcurl -v -x http://username123:password321_country-dk,it,[email protected]:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_region-europe';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?><?php
$username = 'username123';
$password = 'password321_country-dk,it,ie';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/access/availability/static-residential'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/access/availability/static-residential',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/access/availability/static-residential";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/access/availability/static-residential"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/access/availability/static-residential";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"country_code": "DE",
"country_name": "Germany",
"available_ips": 2887
},
{
"country_code": "GB",
"country_name": "United Kingdom",
"available_ips": 2351
},
{
"country_code": "US",
"country_name": "United States",
"available_ips": 1112
},
{
"country_code": "NL",
"country_name": "Netherlands",
"available_ips": 1293
},
{
"country_code": "IT",
"country_name": "Italy",
"available_ips": 1812
},
...
]
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"order_id": 12345,
"username": "new_username",
"password": "new_password",
"random_password": false,
"is_reset": true,
"proxies": ["proxy1", "proxy2"]
}'<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$proxies = ['proxy1', 'proxy2'];
$username = 'new_username';
$password = 'new_password';
$random_password = false;
$is_reset = true;
$url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'proxies' => $proxies,
'order_id' => $order_id,
'username' => $username,
'password' => $password,
'random_password' => $random_password,
'is_reset' => $is_reset,
])
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
order_id = 12345
proxies = ['proxy1', 'proxy2']
username = 'new_username'
password = 'new_username'
random_password = False
is_reset = True
url = 'https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
payload = {
'order_id': order_id,
'proxies': proxies,
'username': username,
'password': password,
'random_password': random_password,
'is_reset': is_reset
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const proxies = ['proxy1', 'proxy2'];
const username = 'new_username';
const password = 'new_password';
const random_password = false;
const is_reset = true;
const data = JSON.stringify({
order_id: order_id,
proxies: proxies,
username: username,
password: password,
random_password: random_password,
is_reset: is_reset
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders/proxies/change-credentials',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
String requestBody = """
{
"order_id": 12345,
"username": "new_username",
"password": "new_password",
"random_password": false,
"is_reset": true,
"proxies": ["proxy1", "proxy2"]
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
)
func main() {
proxies := []string{"proxy1", "proxy2"}
orderID := 12345
username := "new_username"
password := "new_password"
randomPassword := false
isReset := true
requestBody := map[string]interface{}{
"order_id": orderID,
"username": username,
"password": password,
"random_password": randomPassword,
"is_reset": isReset,
"proxies": proxies,
}
jsonData, err := json.Marshal(requestBody)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
url := "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials"
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
var requestBody = new
{
order_id = 12345,
username = "new_username",
password = "new_password",
random_password = false,
is_reset = true,
proxies = new string[] { "proxy1", "proxy2" }
};
string url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(requestBody);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_region-europe'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_region-europe';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-dk,it,ie'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-dk,it,ie';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();curl -v -x http://username123:[email protected]:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321';
$country = 'country-de';
$city = 'city-berlin';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
$headers = [
"X-Country: $country",
"X-City: $city"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-de_city-berlin'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-de_city-berlin';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();curl -v -x http://username123:[email protected]:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-us_state-iowa';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-us_state-iowa'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-us_state-iowa';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();curl -v -x http://username123:password321_country-gb_city-birmingham_isp-skyuklimited@geo.iproyal.com:12321 -L http://example.com<?php
$username = 'username123';
$password = 'password321_country-gb_city-birmingham_isp-skyuklimited';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
from requests.auth import HTTPProxyAuth
username = 'username123'
password = 'password321_country-gb_city-birmingham_isp-skyuklimited'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'
proxies = {
'http': f'http://{proxy}',
'https': f'http://{proxy}',
}
auth = HTTPProxyAuth(username, password)
response = requests.get(url, proxies=proxies, auth=auth)
print(response.text)const http = require('http');
const username = 'username123';
const password = 'password321_country-gb_city-birmingham_isp-skyuklimited';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';
const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;
const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');
const options = {
host: proxyHost,
port: proxyPort,
method: 'GET',
path: targetUrl,
headers: {
'Host': targetHost,
'Proxy-Authorization': auth
}
};
const req = http.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();GET /access/availability/dc
Returns a list of countries with available proxies count.
To use this feature, the admin must enable it. This feature requires a minimum total spend of $10000.
Example request:
Example response:
POST /orders/proxies/change-credentials
Body Parameters
Example request:
payment_method
String
balance or card
card_id
Integer
Card that is attached to the user
curl -X GET https://resi-api.iproyal.com/v1/residential/subscription \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/subscription';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>random_password
Boolean
Should we assign a random password
is_reset
Boolean
Should we assign a random username and password
order_id
Integer
Order id
proxies
Array
List of proxies
username
String
Proxy connection username
password
String
Proxy connection password
curl -X GET "https://apid.iproyal.com/v1/reseller/access/availability/dc" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/access/availability/dc";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/subscription'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/residential/subscription';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/residential/subscription";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/subscription"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential/subscription";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"quantity": 1000,
"amount": 3150,
"status": "paid",
"next_payment_date": "2025-07-26",
"payment_method": "balance",
"card_id": null
}curl -X DELETE https://resi-api.iproyal.com/v1/residential/subscription \
-H "Authorization: Bearer <your_api_token>"
-H "Content-Type: application/json" <?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/subscription';
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/orders'
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.delete(url, headers=headers)
print(response.status_code)
if response.status_code == 204:
print("Subscription deleted successfully")const https = require('https');
const apiToken = '<your_api_token>';
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/residential/subscription',
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + apiToken,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
console.log('Status Code:', res.statusCode);
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
if (responseData) {
console.log('Response:', responseData);
} else {
console.log('No response body');
}
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String url = "https://resi-api.iproyal.com/v1/residential/subscription";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/subscription"
)
func main() {
req, err := http.NewRequest(http.MethodDelete, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
if len(responseBody) > 0 {
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
} else {
fmt.Println("No response body")
}
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential/subscription";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
HttpResponseMessage response = await client.DeleteAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
if (!string.IsNullOrEmpty(responseText))
{
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
else
{
Console.WriteLine("No response body");
}
}
}
}curl -X POST https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_token>" \
-d '{
"payment_method": "card",
"card_id": 1231
}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method';
$data = [
'payment_method' => 'card',
'card_id' => 1231
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method';
data = {
'payment_method': 'card',
'card_id': 1231
}
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)const https = require('https');
const apiToken = '<your_api_token>';
const data = JSON.stringify({payment_method: 'balance'});
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/residential/subscription/change-payment-method',
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiToken,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method";
String requestBody = """
{
"payment_method": "card",
"card_id": 1231
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method"
)
func main() {
data := map[string]interface{}{
"payment_method": "balance",
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method";
var data = new
{
payment_method = "card",
card_id = 322
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
}
}
}import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/access/availability/dc'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/access/availability/dc',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/access/availability/dc";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/access/availability/dc"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/access/availability/dc";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"country_code": "DE",
"country_name": "Germany",
"available_ips": 2887
},
{
"country_code": "GB",
"country_name": "United Kingdom",
"available_ips": 2351
},
{
"country_code": "US",
"country_name": "United States",
"available_ips": 1112
},
{
"country_code": "NL",
"country_name": "Netherlands",
"available_ips": 1293
},
{
"country_code": "IT",
"country_name": "Italy",
"available_ips": 1812
},
...
]
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"order_id": 12345,
"username": "new_username",
"password": "new_password",
"random_password": false,
"is_reset": true,
"proxies": ["proxy1", "proxy2"]
}'<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$proxies = ['proxy1', 'proxy2'];
$username = 'new_username';
$password = 'new_password';
$random_password = false;
$is_reset = true;
$url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'proxies' => $proxies,
'order_id' => $order_id,
'username' => $username,
'password' => $password,
'random_password' => $random_password,
'is_reset' => $is_reset,
])
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
order_id = 12345
proxies = ['proxy1', 'proxy2']
username = 'new_username'
password = 'new_username'
random_password = False
is_reset = True
url = 'https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
payload = {
'order_id': order_id,
'proxies': proxies,
'username': username,
'password': password,
'random_password': random_password,
'is_reset': is_reset
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const proxies = ['proxy1', 'proxy2'];
const username = 'new_username';
const password = 'new_password';
const random_password = false;
const is_reset = true;
const data = JSON.stringify({
order_id: order_id,
proxies: proxies,
username: username,
password: password,
random_password: random_password,
is_reset: is_reset
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders/proxies/change-credentials',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
String requestBody = """
{
"order_id": 12345,
"username": "new_username",
"password": "new_password",
"random_password": false,
"is_reset": true,
"proxies": ["proxy1", "proxy2"]
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
)
func main() {
proxies := []string{"proxy1", "proxy2"}
orderID := 12345
username := "new_username"
password := "new_password"
randomPassword := false
isReset := true
requestBody := map[string]interface{}{
"order_id": orderID,
"username": username,
"password": password,
"random_password": randomPassword,
"is_reset": isReset,
"proxies": proxies,
}
jsonData, err := json.Marshal(requestBody)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
url := "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials"
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
var requestBody = new
{
order_id = 12345,
username = "new_username",
password = "new_password",
random_password = false,
is_reset = true,
proxies = new string[] { "proxy1", "proxy2" }
};
string url = "https://apid.iproyal.com/v1/reseller/orders/proxies/change-credentials";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(requestBody);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}GET /residential/orders
Query Parameters
POST /residential/orders
Body Parameters:
Example request:
Response:
GET /residential/orders/calculate-pricing
Query Parameters:
page
Integer
Number of page
per_page
Integer
Number of orders to get per page
quantity
Integer
GB quantity
coupon_code
String
A discount code to apply to the order, if available.
card_id
Integer
If supplied - card will be billed for this order, if not - we will try to deduct the amount from balance
order_billing_type
String
subscription or regular default - subscription
quantity
Integer
Required. The amount of the product to order.
coupon_code
String
Optional. Discount code for the order.
order_billing_type
String
subscription or regular default - subscription
curl -X GET "https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"data": [
{
"id": 4,
"note": null,
"product_name": "Residential",
"status": "confirmed",
"amount": 50,
"quantity": 10,
"order_billing_type": "subscription",
"created_at": "2025-06-26 10:01:50"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}curl -X POST https://resi-api.iproyal.com/v1/residential/orders \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"quantity": 10}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/orders';
$data = ['quantity' => 10];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/orders'
data = {'quantity': 10}
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const apiToken = '<your_api_token>';
const data = JSON.stringify({quantity: 10});
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/residential/orders',
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiToken,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_api_token>";
String url = "https://resi-api.iproyal.com/v1/residential/orders";
String requestBody = """
{
"quantity": 10
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/orders"
)
func main() {
data := map[string]interface{}{
"quantity": 10,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential/orders";
var data = new
{
quantity = 10,
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 4,
"note": null,
"product_name": "Residential",
"status": "confirmed",
"amount": 50,
"quantity": 10,
"order_billing_type": "subscription",
"created_at": "2025-06-26 10:01:50"
}curl -X GET https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"quantity": 10}'<?php
$api_token = '<your_api_token>';
$data = ['quantity' => 10];
$url = 'https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing' . http_build_query($data);
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing'
data = {'quantity': 10}
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const apiToken = '<your_api_token>';
const data = JSON.stringify({quantity: 10});
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/residential/orders/calculate-pricing',
method: 'GET',
headers: {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
Number quantity = 10;
String url = "https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing?quantity=" + quantity;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + accessToken)
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing"
)
func main() {
data := map[string]interface{}{
"quantity": 10,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodGet, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_key>";
string baseUrl = "https://resi-api.iproyal.com/v1/residential/orders/calculate-pricing";
int quantity = 10;
string url = $"{baseUrl}?quantity={quantity}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"total": 50
}page
Integer
Number of page
per_page
Integer
Number of orders to get per page
quantity
Integer
Required. Requests quantity
coupon_code
String
A discount code to apply to the order, if available.
card_id
Integer
Optional. If supplied - card will be billed for this order, if not - we will try to deduct the amount from balance
quantity
Integer
Required. The amount of the product to order.
coupon_code
String
Optional. Discount code for the order.
curl -X GET "https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10"
)
func main() {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/web-unblocker/orders?page=1&per_page=10";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"data": [
{
"id": 4,
"note": null,
"product_name": "Web Unblocker",
"status": "confirmed",
"amount": 9,
"quantity": 10000,
"created_at": "2025-06-26 10:01:50"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}curl -X POST https://resi-api.iproyal.com/v1/web-unblocker/orders \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"quantity": 10000}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders';
$data = ['quantity' => 10000];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders'
data = {'quantity': 10000}
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const apiToken = '<your_api_token>';
const data = JSON.stringify({quantity: 10000});
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/web-unblocker/orders',
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiToken,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://resi-api.iproyal.com/v1/web-unblocker/orders";
String requestBody = """
{
"quantity": 10000
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
url = "https://resi-api.iproyal.com/v1/web-unblocker/orders"
)
func main() {
data := map[string]interface{}{
"quantity": 10000,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://resi-api.iproyal.com/v1/web-unblocker/orders";
var data = new
{
quantity = 10000,
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 4,
"note": null,
"product_name": "Web Unblocker",
"status": "confirmed",
"amount": 9,
"quantity": 10000,
"created_at": "2025-06-26 10:01:50"
}curl -X GET https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"quantity": 10000}'<?php
$api_token = '<your_api_token>';
$quantity = 10000;
$url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing';
$url_with_params = $url . '?quantity=' . $quantity;
$options = [
CURLOPT_URL => $url_with_params,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_HTTPGET => true
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing'
data = {'quantity': 10000}
headers = {
'Authorization': 'Bearer ' + api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const apiToken = '<your_api_token>';
const data = JSON.stringify({quantity: 10000});
const options = {
hostname: 'resi-api.iproyal.com',
path: '/v1/web-unblocker/orders/calculate-pricing',
method: 'GET',
headers: {
'Authorization': 'Bearer ' + apiToken,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class TestJava {
public static void main(String[] args) throws Exception {
String accessToken = "<your_api_token>";
int quantity = 10000;
String baseUrl = "https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing";
String url = baseUrl + "?quantity=" + quantity;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + accessToken)
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
"net/url"
"strconv"
)
const (
apiToken = "<your_api_token>"
baseURL = "https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing"
)
func main() {
quantity := 10000
u, err := url.Parse(baseURL)
if err != nil {
log.Fatal("Error parsing URL:", err)
}
q := u.Query()
q.Set("quantity", strconv.Itoa(quantity))
u.RawQuery = q.Encode()
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println("Response Body:", string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string baseUrl = "https://resi-api.iproyal.com/v1/web-unblocker/orders/calculate-pricing";
int quantity = 10000;
string url = $"{baseUrl}?quantity={quantity}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine("Status Code: " + (int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
try
{
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine("Response: " + jsonResponse);
}
catch (JsonException)
{
Console.WriteLine("Response: " + responseText);
}
}
}
}{
"total": 10
}The link provided below directs to a detailed page that elaborates on the concept of IP skipping within our system.
It's important to note that almost every endpoint related to IP skipping, with the notable exceptions of the index and delete endpoints, will return an IP skipping resource upon a successful call.
POST /residential-users/{residential_user_hash}/ips-skipping
Query Parameters
Body Parameters
Example request:
Example response:
GET /residential-users/{residential_user_hash}/ips-skipping
Query Parameters
Example request:
Example response:
UPDATE /residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}
Query Parameters
Body Parameters
Example request:
Example response:
DELETE /residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}
Query Parameters
Example request:
{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"title": "192.0.2.1",
"items": [
{
"hash": "01HQJ5GS1NXBP562CCQFQB6XN7",
"ip_range": "24.52.81.2/32"
},
{
"hash": "01HQJ5GW9NXBCC62CCQFQB6XN7",
"ip_range": "14.51.82.2/32"
}
]
}residential_user_hash
String
Hash of the user
title
String
Title of the IP skipping list
residential_user_hash
String
Hash of the user
residential_user_hash
String
Hash of the user
ips_skipping_hash
String
Hash of the IPs skipping list
title
String
Title of the skipping list
ip_ranges
Array
Ranges to be added to the list
residential_user_hash
String
Hash of the user
ips_skipping_hash
String
Hash of the IPs skipping list
curl -X POST "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Your Title"
}'<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$title = 'Your Title';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping";
$data = ['title' => $title];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
title = 'Your Title'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping'
data = {
'title': title
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const title = 'Your Title';
const data = JSON.stringify({
title: title
});
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping`,
method: 'POST',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String url = "https://resi-api.iproyal.com/v1/residential-users/" + residentialUserHash + "/ips-skipping";
String requestBody = """
{
"title": "Your Title"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
title = "Your Title"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping", residentialUserHash)
data := map[string]interface{}{
"title": title,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string title = "Your Title";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/ips-skipping";
var data = new
{
title = title
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"title": "Your Title",
"items": [
{
"hash": "01HQJ5GS1NXBP562CCQFQB6XN7",
"ip_range": "24.52.81.2/32"
},
{
"hash": "01HQJ5GW9NXBCC62CCQFQB6XN7",
"ip_range": "14.51.82.2/32"
}
]
}curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping'
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping`,
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping", residentialUserHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping", residentialUserHash)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Printf(string(responseBody))
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/ips-skipping";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"title": "Your Title",
"items": [
{
"hash": "01HQJ5GS1NXBP562CCQFQB6XN7",
"ip_range": "24.52.81.2/32"
},
{
"hash": "01HQJ5GW9NXBCC62CCQFQB6XN7",
"ip_range": "14.51.82.2/32"
}
]
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "/",
"per_page": 15,
"to": 1,
"total": 1
}
}curl -X PUT "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping/<ips_skipping_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "New Title",
"ip_ranges": ["192.168.0.0/24", "10.0.0.0/8"]
}'<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$ips_skipping_hash = '<ips_skipping_hash>';
$title = 'New Title';
$ip_ranges = ['192.168.0.0/24', '10.0.0.0/8'];
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping/$ips_skipping_hash";
$data = [
'title' => $title,
'ip_ranges' => $ip_ranges
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
ips_skipping_hash = '<ips_skipping_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}'
data = {
'title': 'New Title',
'ip_ranges': ['192.168.0.0/24', '10.0.0.0/8']
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=data, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const ips_skipping_hash = '<ips_skipping_hash>';
const title = 'New Title';
const ip_ranges = ['192.168.0.0/24', '10.0.0.0/8'];
const data = JSON.stringify({ title, ip_ranges });
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping/${ips_skipping_hash}`,
method: 'PUT',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String ipsSkippingHash = "<ips_skipping_hash>";
String url = "https://resi-api.iproyal.com/v1/residential-users/" + residentialUserHash + "/ips-skipping/" + ipsSkippingHash;
String requestBody = """
{
"title": "New Title",
"ip_ranges": ["192.168.0.0/24", "10.0.0.0/8"]
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
ipsSkippingHash = "<ips_skipping_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping/%s", residentialUserHash, ipsSkippingHash)
data := map[string]interface{}{
"title": "New Title",
"ip_ranges": []string{"192.168.0.0/24", "10.0.0.0/8"},
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPut, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string ipsSkippingHash = "<ips_skipping_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/ips-skipping/{ipsSkippingHash}";
var data = new
{
title = "New Title",
ip_ranges = new string[] { "192.168.0.0/24", "10.0.0.0/8" }
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PutAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}
{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"title": "New Title",
"items": [
{
"hash": "01HQJ5GS1NXBP562CCQFQB6XN7",
"ip_range": "192.168.0.0/24"
},
{
"hash": "01HQJ5GW9NXBCC62CCQFQB6XN7",
"ip_range": "10.0.0.0/8"
}
]
}curl -X DELETE "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/ips-skipping/<ips_skipping_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$ips_skipping_hash = '<ips_skipping_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/ips-skipping/$ips_skipping_hash";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
ips_skipping_hash = '<ips_skipping_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/ips-skipping/{ips_skipping_hash}'
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.delete(url, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const ips_skipping_hash = '<ips_skipping_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/ips-skipping/${ips_skipping_hash}`,
method: 'DELETE',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String ipsSkippingHash = "<ips_skipping_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping/%s", residentialUserHash, ipsSkippingHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("DELETE request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
ipsSkippingHash = "<ips_skipping_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/ips-skipping/%s", residentialUserHash, ipsSkippingHash)
req, err := http.NewRequest(http.MethodDelete, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string ipsSkippingHash = "<ips_skipping_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/ips-skipping/{ipsSkippingHash}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.DeleteAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}The link provided below directs to a detailed page that elaborates on the concept of a whitelist within our system.
It's important to note that almost every endpoint related to whitelists, with the notable exceptions of the index and delete endpoints, will return a whitelist entry resource upon a successful call.
POST /residential-users/{ residential_user_hash }/whitelist-entries
Query Parameters
Body Parameters
Example request:
Example response:
GET /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }
Query Parameters
Example request:
Example response:
GET /residential-users/{ residential_user_hash }/whitelist-entries/
Query Parameters
Example request:
Example response:
UPDATE /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }
Query Parameters
Body Parameters
Example request:
Example response:
DELETE /residential-users/{ residential_user_hash }/whitelist-entries/{ whitelist_entry_hash }
Query Parameters
Example request:
{
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"ip": "192.0.2.1",
"port": "23234",
"type": "http|https",
"configuration": "_country-br_streaming-1_skipispstatic-1"
}residential_user_hash
String
Hash of the user
ip
String
Ip of the entry
port
Integer
Port that will be used
configuration
String
Proxy configuration
note
String
Proxy note
residential_user_hash
String
Hash of the user
whitelist_entry_hash
String
Hash of the entry
residential_user_hash
String
Hash of the user
page
Integer
Number of the page
per_page
Integer
Number of whitelist entries per page
residential_user_hash
String
Hash of the user
whitelist_entry_hash
String
Hash of the entry
configuration
String
Proxy configuration
note
String
Proxy note
residential_user_hash
String
Hash of the user
whitelist_entry_hash
String
Hash of the entry
curl -X POST "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"ip": "192.168.1.1",
"port": 8080,
"configuration": "some_configuration"
}'<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$ip = '192.168.1.1';
$port = 8080;
$configuration = 'some_configuration';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/whitelist-entries";
$data = [
'ip' => $ip,
'port' => $port,
'configuration' => $configuration
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries'
data = {
'ip': '192.168.1.1',
'port': 8080,
'configuration': 'some_configuration'
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const ip = '192.168.1.1';
const port = 8080;
const configuration = 'some_configuration';
const data = JSON.stringify({ ip, port, configuration });
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/whitelist-entries`,
method: 'POST',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String url = "https://resi-api.iproyal.com/v1/residential-users/" + residentialUserHash + "/whitelist-entries";
String requestBody = """
{
"ip": "192.168.1.1",
"port": 8080,
"configuration": "some_configuration"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries", residentialUserHash)
data := map[string]interface{}{
"ip": "192.168.1.1",
"port": 8080,
"configuration": "some_configuration",
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/whitelist-entries";
var data = new
{
ip = "192.168.1.1",
port = 8080,
configuration = "some_configuration"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"hash": "01JVRVH56YYVG2RZDFA123ABCD",
"ip": "192.168.1.1",
"port": 8080,
"type": "?",
"configuration": "some_configuration",
"note": null
}curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$whitelist_entry_hash = '<whitelist_entry_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/whitelist-entries/$whitelist_entry_hash";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token"
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
whitelist_entry_hash = '<whitelist_entry_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries/{whitelist_entry_hash}'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const whitelist_entry_hash = '<whitelist_entry_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/whitelist-entries/${whitelist_entry_hash}`,
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String whitelistEntryHash = "<whitelist_entry_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries/%s", residentialUserHash, whitelistEntryHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
whitelistEntryHash = "<whitelist_entry_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries/%s", residentialUserHash, whitelistEntryHash)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string whitelistEntryHash = "<whitelist_entry_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/whitelist-entries/{whitelistEntryHash}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"hash": "01JVRVH56YYVG2RZDFA123ABCD",
"ip": "192.168.1.1",
"port": 8080,
"type": "?",
"configuration": "some_configuration",
"note": null
}curl -X GET "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries?page=<page>&per_page=<per_page>" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$page = 1;
$per_page = 10;
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/whitelist-entries?page=$page&per_page=$per_page";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token"
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
page = 1
per_page = 10
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries?page={page}&per_page={per_page}'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const page = 1;
const per_page = 10;
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/whitelist-entries?page=${page}&per_page=${per_page}`,
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
int page = 1;
int perPage = 10;
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries?page=%d&per_page=%d", residentialUserHash, page, perPage);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
page = 1
perPage = 10
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries?page=%d&per_page=%d", residentialUserHash, page, perPage)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
int page = 1;
int perPage = 10;
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/whitelist-entries?page={page}&per_page={perPage}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"data": [
{
"hash": "01JVRVH56YYVG2RZDFA123ABCD",
"ip": "192.168.1.1",
"port": 8080,
"type": "?",
"configuration": "some_configuration",
"note": null
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "/",
"per_page": 20,
"to": 1,
"total": 1
}
}curl -X PUT "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"configuration": "updated_configuration"
}'import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
whitelist_entry_hash = '<whitelist_entry_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries/{whitelist_entry_hash}'
configuration = {
'configuration': {}
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=configuration, headers=headers)
print(response.text)import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
whitelist_entry_hash = '<whitelist_entry_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries/{whitelist_entry_hash}'
configuration = {
'configuration': {}
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=configuration, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const whitelist_entry_hash = '<whitelist_entry_hash>';
const configuration = JSON.stringify({
configuration: {}
});
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/whitelist-entries/${whitelist_entry_hash}`,
method: 'PUT',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': configuration.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(configuration);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String whitelistEntryHash = "<whitelist_entry_hash>";
String url = "https://resi-api.iproyal.com/v1/residential-users/" + residentialUserHash + "/whitelist-entries/" + whitelistEntryHash;
String requestBody = """
{
"configuration": {}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
whitelistEntryHash = "<whitelist_entry_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries/%s", residentialUserHash, whitelistEntryHash)
configuration := map[string]interface{}{
"configuration": map[string]interface{}{},
}
jsonData, err := json.Marshal(configuration)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPut, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string whitelistEntryHash = "<whitelist_entry_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/whitelist-entries/{whitelistEntryHash}";
var configuration = new
{
configuration = ""
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(configuration);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PutAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}
{
"hash": "01JVRVH56YYVG2RZDFA123ABCD",
"ip": "192.168.1.1",
"port": 8080,
"type": "?",
"configuration": "updated_configuration",
"note": null
}curl -X DELETE "https://resi-api.iproyal.com/v1/residential-users/<residential_user_hash>/whitelist-entries/<whitelist_entry_hash>" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$residential_user_hash = '<residential_user_hash>';
$whitelist_entry_hash = '<whitelist_entry_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-users/$residential_user_hash/whitelist-entries/$whitelist_entry_hash";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token"
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
residential_user_hash = '<residential_user_hash>'
whitelist_entry_hash = '<whitelist_entry_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-users/{residential_user_hash}/whitelist-entries/{whitelist_entry_hash}'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.delete(url, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const residential_user_hash = '<residential_user_hash>';
const whitelist_entry_hash = '<whitelist_entry_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-users/${residential_user_hash}/whitelist-entries/${whitelist_entry_hash}`,
method: 'DELETE',
headers: {
'Authorization': `Bearer ${api_token}`
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String residentialUserHash = "<residential_user_hash>";
String whitelistEntryHash = "<whitelist_entry_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries/%s", residentialUserHash, whitelistEntryHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("DELETE request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
residentialUserHash = "<residential_user_hash>"
whitelistEntryHash = "<whitelist_entry_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-users/%s/whitelist-entries/%s", residentialUserHash, whitelistEntryHash)
req, err := http.NewRequest(http.MethodDelete, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string residentialUserHash = "<residential_user_hash>";
string whitelistEntryHash = "<whitelist_entry_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-users/{residentialUserHash}/whitelist-entries/{whitelistEntryHash}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.DeleteAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}geo.iproyal.com which will automatically determine the best server for your location.Example request:
curl -X GET https://resi-api.iproyal.com/v1/access/entry-nodes \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/access/entry-nodes';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt
Example response:
GET /access/countries
Returns a list of countries, cities, states, and ISPs (Internet Service Providers) that could be used to target a specific proxy. It also returns prefixes to use for each. For more information on how to build a proxy string, refer to our 'Proxy' subsection.
Example request:
Example response:
Similarly to Access, it returns available regions for use when targeting a proxy.
GET /access/regions
Example request:
Example response:
GET /access/country-sets
Similarly to Access, it returns available country sets to use when targeting a proxy.
Example request:
Example response:
POST /access/generate-proxy-list
Body Parameters
format
String
Format in which proxy strings will be returned
hostname
String
Hostname that will be used
port
String
Port as protocol type
Example request:
Example response:
import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/entry-nodes'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/access/entry-nodes';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/access/entry-nodes";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
entryNodesURL = "https://resi-api.iproyal.com/v1/access/entry-nodes"
)
func main() {
req, err := http.NewRequest(http.MethodGet, entryNodesURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/access/entry-nodes";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}curl -X GET https://resi-api.iproyal.com/v1/access/countries \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/access/countries';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/countries'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/access/countries';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/access/countries";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
countriesURL = "https://resi-api.iproyal.com/v1/access/countries"
)
func main() {
req, err := http.NewRequest(http.MethodGet, countriesURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/access/countries";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}curl -X GET https://resi-api.iproyal.com/v1/access/regions \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/access/regions';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/regions'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/access/regions';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/access/regions";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
regionsURL = "https://resi-api.iproyal.com/v1/access/regions"
)
func main() {
req, err := http.NewRequest(http.MethodGet, regionsURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/access/regions";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}curl -X GET https://resi-api.iproyal.com/v1/access/country-sets \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/access/country-sets';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/country-sets'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/access/country-sets';
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/access/country-sets";
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
countrySetsURL = "https://resi-api.iproyal.com/v1/access/country-sets"
)
func main() {
req, err := http.NewRequest(http.MethodGet, countrySetsURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/access/country-sets";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}curl -X POST https://resi-api.iproyal.com/v1/access/generate-proxy-list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_token>" \
-d '{
"format": "{hostname}:{port}:{username}:{password}",
"hostname": "example.hostname.com",
"port": "http|https",
"rotation": "sticky",
"location": "_country-sg",
"proxy_count": 10,
"subuser_hash": "example_subuser_hash",
"lifetime": "2h"
}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list';
$data = [
'format' => '{hostname}:{port}:{username}:{password}',
'hostname' => 'example.hostname.com',
'port' => 'http|https',
'rotation' => 'sticky',
'location' => '_country-sg',
'proxy_count' => 10,
'subuser_hash' => 'example_subuser_hash'
];
$payload = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
"Authorization: Bearer $api_token"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list'
data = {
'format': '{hostname}:{port}:{username}:{password}',
'hostname': 'example.hostname.com',
'port': 'http|https',
'rotation': 'sticky',
'location': '_country-sg',
'proxy_count': 10,
'subuser_hash': 'example_subuser_hash'
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {api_token}'
}
response = requests.post(url, json=data, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/access/generate-proxy-list';
const data = JSON.stringify({
format: '{hostname}:{port}:{username}:{password}',
hostname: 'example.hostname.com',
port: 'http|https',
rotation: 'sticky',
location: '_country-sg',
proxy_count: 10,
subuser_hash: 'example_subuser_hash'
});
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String urlString = "https://resi-api.iproyal.com/v1/access/generate-proxy-list";
String requestBody = """
{
"format": "{hostname}:{port}:{username}:{password}",
"hostname": "example.hostname.com",
"port": "http|https",
"rotation": "sticky",
"location": "_country-sg",
"proxy_count": 10,
"subuser_hash": "example_subuser_hash",
"lifetime": "2h"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
proxyURL = "https://resi-api.iproyal.com/v1/access/generate-proxy-list"
)
func main() {
data := map[string]interface{}{
"format": "{hostname}:{port}:{username}:{password}",
"hostname": "example.hostname.com",
"port": "http|https",
"rotation": "sticky",
"location": "_country-sg",
"proxy_count": 10,
"subuser_hash": "example_subuser_hash",
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, proxyURL, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System.Text;
using System.Text.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/access/generate-proxy-list";
var data = new
{
format = "{hostname}:{port}:{username}:{password}",
hostname = "example.hostname.com",
port = "http|https",
rotation = "sticky",
location = "_country-sg",
proxy_count = 10,
subuser_hash = "example_subuser_hash"
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}[
{
"dns": "proxy.iproyal.com",
"ips": ["91.239.130.34"],
"ports": [
{
"name": "http|https",
"port": 12321,
"alternative_ports": [
11200,
...
]
},
{
"name": "socks5",
"port": 32325,
"alternative_ports": [
51200,
...
]
}
]
},
{
"dns": "us.proxy.iproyal.com",
"ips": ["23.146.144.102", "23.146.144.102"],
"ports": [
{
"name": "http|https",
"port": 12321,
"alternative_ports": [
11246,
...
]
},
{
"name": "socks5",
"port": 32325,
"alternative_ports": [
51200,
...
]
}
]
},
...
]{
"prefix": "_country-",
"countries": [
{
"code": "am",
"name": "Armenia",
"cities": {
"prefix": "_city-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"isps": {
"prefix": "_isp-",
"options": [
{
"code": "prostieresheniallc",
"name": "Prostie Reshenia LLC"
}
]
}
}
]
},
"states": {
"prefix": "_state-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"cities": {
"prefix": "_city-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"isps": {
"prefix": "_isp-",
"options": []
}
}
]
},
"isps": {
"prefix": "_isp-",
"options": [
{
"code": "prostieresheniallc",
"name": "Prostie Reshenia LLC"
}
]
}
}
]
}
}
]
}
{
"prefix": "_region-",
"regions": [
{
"code": "africa",
"name": "Africa"
},
{
"code": "arabstates",
"name": "Arab States"
},
{
"code": "asiapacific",
"name": "Asia & Pacific"
},
{
"code": "europe",
"name": "Europe"
},
{
"code": "middleeast",
"name": "Middle east"
},
{
"code": "northamerica",
"name": "North America"
},
{
"code": "southlatinamerica",
"name": "South/Latin America"
}
]
}{
"prefix": "_set-",
"countrySets": [
{
"code": "courir",
"name": "COURIR"
},
{
"code": "mesh1",
"name": "MESH 1"
},
{
"code": "mesh2",
"name": "MESH 2"
},
{
"code": "nikeas",
"name": "NIKE ASIA"
},
{
"code": "nikeeu",
"name": "NIKE EU"
},
{
"code": "nikena",
"name": "NIKE US"
},
{
"code": "zalando",
"name": "ZALANDO"
}
]
}[
"geo.iproyal.com:0:[email protected]:royal123_session-abc123_lifetime-24h",
"geo.iproyal.com:0:[email protected]:royal123_session-cba321_lifetime-24h",
]rotation
String
Rotation that will be used
subuser_hash
String
Subuser that will be used
location
String
Location that will be used
proxy_count
Integer
Proxy count that will be returned
username
String
Username that will be used
password
String
Password that will be used
lifetime
String
For sticky sessions this will tell how long this session will last
http|https
socks5sticky
random5s
10m
20h
{hostname}:{port}:{username}:{password}
{hostname}:{port}@{username}:{password}
{username}:{password}:{hostname}:{port}The link provided below directs to a page that elaborates on the concept of a sub-user within our system.
It's important to note that almost every endpoint related to sub-users, with the notable exceptions of the index and delete endpoints, will return a Subuser resource upon a successful call.
Note that you should not use the id field. It is a legacy field that will be removed in the future.
POST /residential-subusers
Body Parameters
Example request:
Example response:
GET /residential-subusers/{ hash }
Query Parameters
Example request:
Example response:
GET /residential-subusers
Query Parameters
Example request:
Example response:
UPDATE /residential-subusers/{ hash }
Query Parameters
Body Parameters
Example request:
Example response:
DELETE /residential-subusers/{ hash }
Query Parameters
Example request:
POST /residential-subusers/{ hash }/give-traffic
Query Parameters
Body Parameters
Example request:
Example response:
POST /residential-subusers/{ hash }/take-traffic
Query Parameters
Body Parameters
Example request:
Example response:
{
"id": 5,
"hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
"username": "subuser_231",
"password": "asffqwv2f3w4214v",
"traffic_available": 0.25,
"traffic_used": 0
}username
String
username of the subuser
password
String
password of the subuser
traffic
Float
traffic (GB) that will be assigned to the subuser
limits
Array
optional parameter to define limits that will be assigned to the subuser. The structure may consist of the following keys: daily_limit, monthly_limit, and/or lifetime_limit.
hash
String
hash of the subuser
page
Integer
Number of the page
per_page
Integer
Number of subusers per page
search
String
Search that will be used to filter subusers by username
hash
String
hash of the subuser
username
String
username of the subuser
password
String
password of the subuser
traffic
Float
traffic (GB) that will be assigned to the subuser
limits
Array
optional parameter to define limits that will be assigned to the subuser. The structure may consist of the following keys: daily_limit, monthly_limit, and/or lifetime_limit.
hash
String
hash of the subuser
hash
String
hash of the subuser
amount
Float
amount of traffic (GB) to give
hash
String
hash of the subuser
amount
Float
amount of traffic (GB) to give
"limits": {
"daily_limit": 5000,
"monthly_limit": 150000,
"lifetime_limit": 1000000
}curl -X POST https://resi-api.iproyal.com/v1/residential-subusers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_token>" \
-d '{
"username": "subuser123",
"password": "securepassword",
"traffic": 10.0,
}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential-subusers';
$data = [
'username' => 'subuser123',
'password' => 'securepassword',
'traffic' => 10.0
];
$payload = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
"Authorization: Bearer $api_token"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
url = 'https://resi-api.iproyal.com/v1/residential-subusers'
data = {
'username': 'subuser123',
'password': 'securepassword',
'traffic': 10.0
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {api_token}'
}
response = requests.post(url, json=data, headers=headers)
print(response.text)const https = require('https');
const apiToken = '<your_api_token>';
const url = 'https://resi-api.iproyal.com/v1/residential-subusers';
const data = JSON.stringify({
username: 'subuser123',
password: 'securepassword',
traffic: 10.0
});
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiToken}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String url = "https://resi-api.iproyal.com/v1/residential-subusers";
String requestBody = """
{
"username": "subuser123",
"password": "securepassword",
"traffic": 10.0
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"encoding/json"
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
residentialSubusersURL = "https://resi-api.iproyal.com/v1/residential-subusers"
)
func main() {
data := map[string]interface{}{
"username": "subuser123",
"password": "securepassword",
"traffic": 10.0,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, residentialSubusersURL, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string url = "https://resi-api.iproyal.com/v1/residential-subusers";
var data = new
{
username = "subuser123",
password = "securepassword",
traffic = 10.0
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "subuser123",
"password": "securepassword",
"traffic_available": 10,
"traffic_used": 0
}curl -X GET "https://resi-api.iproyal.com/v1/residential-subusers/<subuser_hash>" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = "https://resi-api.iproyal.com/v1/residential-subusers/{hash}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $api_token"
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
hash = '<subuser_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-subusers/{hash}'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const hash = '<subuser_hash>';
const url = `https://resi-api.iproyal.com/v1/residential-subusers/${hash}`;
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String subuserHash = "<subuser_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-subusers/%s", subuserHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"io"
"log"
"net/http"
"fmt"
)
const (
apiToken = "<your_api_token>"
subuserHash = "<subuser_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers/%s", subuserHash)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string hash = "<subuser_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers/{hash}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "subuser123",
"password": "securepassword",
"traffic_available": 10,
"traffic_used": 0
}curl -X GET "https://resi-api.iproyal.com/v1/residential-subusers?page=1&per_page=10&search=username_search" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$page = 1;
$per_page = 10;
$search = 'username_search';
$url = "https://resi-api.iproyal.com/v1/residential-subusers?page=$page&per_page=$per_page&search=$search";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $api_token"
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
page = 1
per_page = 10
search = 'username_search'
url = f'https://resi-api.iproyal.com/v1/residential-subusers?page={page}&per_page={per_page}&search={search}'
headers = {
'Authorization': f'Bearer {api_token}'
}
response = requests.get(url, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const page = 1;
const per_page = 10;
const search = 'username_search';
const url = `https://resi-api.iproyal.com/v1/residential-subusers?page=${page}&per_page=${per_page}&search=${search}`;
const options = {
method: 'GET',
headers: {
'Authorization': `Bearer ${api_token}`
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log(data);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
int page = 1;
int perPage = 10;
String search = "username_search";
String urlString = String.format(
"https://resi-api.iproyal.com/v1/residential-subusers?page=%d&per_page=%d&search=%s",
page, perPage, search
);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
page = 1
perPage = 10
search = "username_search"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers?page=%d&per_page=%d&search=%s", page, perPage, search)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
int page = 1;
int perPage = 10;
string search = "username_search";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers?page={page}&per_page={perPage}&search={search}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.GetAsync(url);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"data": [
{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "subuser123",
"password": "securepassword",
"traffic_available": 10,
"traffic_used": 0
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://resi-api.iproyal.com/v1/residential-subusers",
"per_page": 20,
"to": 1,
"total": 1
}
}"limits": {
"daily_limit": 5000,
"monthly_limit": 150000,
"lifetime_limit": 1000000
}curl -X PUT "https://resi-api.iproyal.com/v1/residential-subusers/<subuser_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"username": "new_username",
"password": "new_password",
"traffic": 5.0
}'<?php
$api_token = '<your_api_token>';
$hash = '<subuser_hash>';
$username = 'new_username';
$password = 'new_password';
$traffic = 5.0;
$url = "https://resi-api.iproyal.com/v1/residential-subusers/$hash";
$data = [
'username' => $username,
'password' => $password,
'traffic' => $traffic
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'UPDATE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
hash = '<subuser_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-subusers/{hash}'
data = {
'username': 'new_username',
'password': 'new_password',
'traffic': 5.0
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.put(url, json=data, headers=headers)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const hash = '<subuser_hash>';
const data = JSON.stringify({
username: 'new_username',
password: 'new_password',
traffic: 5.0
});
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-subusers/${hash}`,
method: 'UPDATE',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String apiToken = "<your_api_token>";
String subuserHash = "<subuser_hash>";
String url = "https://resi-api.iproyal.com/v1/residential-subusers/" + subuserHash;
String requestBody = """
{
"username": "new_username",
"password": "new_password",
"traffic": 5.0
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiToken)
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
subuserHash = "<subuser_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers/%s", subuserHash)
data := map[string]interface{}{
"username": "new_username",
"password": "new_password",
"traffic": 5.0,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPut, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string hash = "<subuser_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers/{hash}";
var data = new
{
username = "new_username",
password = "new_password",
traffic = 5.0
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PutAsync(url, content);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "new_username",
"password": "new_password",
"traffic_available": 5,
"traffic_used": 0
}curl -X DELETE "https://resi-api.iproyal.com/v1/residential-subusers/<subuser_hash>" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_api_token>';
$hash = '<subuser_hash>';
$url = "https://resi-api.iproyal.com/v1/residential-subusers/$hash";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
hash = '<subuser_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-subusers/{hash}'
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.delete(url, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const hash = '<subuser_hash>';
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-subusers/${hash}`,
method: 'DELETE',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String subuserHash = "<subuser_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-subusers/%s", subuserHash);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("DELETE request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"fmt"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
subuserHash = "<subuser_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers/%s", subuserHash)
req, err := http.NewRequest(http.MethodDelete, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody := new(bytes.Buffer)
_, err = responseBody.ReadFrom(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(responseBody.String())
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string hash = "<subuser_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers/{hash}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
HttpResponseMessage response = await client.DeleteAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}curl -X POST "https://resi-api.iproyal.com/v1/residential-subusers/<subuser_hash>/give-traffic" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"amount": 5.0
}'<?php
$api_token = '<your_api_token>';
$hash = '<subuser_hash>';
$amount = 5.0;
$url = "https://resi-api.iproyal.com/v1/residential-subusers/$hash/give-traffic";
$data = [
'amount' => $amount
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
hash = '<subuser_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-subusers/{hash}/give-traffic'
data = {
'amount': 5.0
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const hash = '<subuser_hash>';
const amount = 5.0;
const data = JSON.stringify({ amount });
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-subusers/${hash}/give-traffic`,
method: 'POST',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String subuserHash = "<subuser_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-subusers/%s/give-traffic", subuserHash);
String jsonData = String.format("{\"amount\": %s}", 5.0);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
OutputStream os = connection.getOutputStream();
os.write(jsonData.getBytes());
os.flush();
os.close();
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("POST request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
subuserHash = "<subuser_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers/%s/give-traffic", subuserHash)
data := map[string]interface{}{
"amount": 5.0,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string hash = "<subuser_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers/{hash}/give-traffic";
var data = new
{
amount = 5.0
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "new_username",
"password": "new_password",
"traffic_available": 15,
"traffic_used": 0
}curl -X POST "https://resi-api.iproyal.com/v1/residential-subusers/<subuser_hash>/take-traffic" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"amount": 5.0
}'<?php
$api_token = '<your_api_token>';
$hash = '<subuser_hash>';
$amount = 5.0;
$url = "https://resi-api.iproyal.com/v1/residential-subusers/$hash/take-traffic";
$data = [
'amount' => $amount
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_api_token>'
hash = '<subuser_hash>'
url = f'https://resi-api.iproyal.com/v1/residential-subusers/{hash}/take-traffic'
data = {
'amount': 5.0
}
headers = {
'Authorization': f'Bearer {api_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.text)const https = require('https');
const api_token = '<your_api_token>';
const hash = '<subuser_hash>';
const amount = 5.0;
const data = JSON.stringify({ amount });
const options = {
hostname: 'resi-api.iproyal.com',
path: `/v1/residential-subusers/${hash}/take-traffic`,
method: 'POST',
headers: {
'Authorization': `Bearer ${api_token}`,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_api_token>";
String subuserHash = "<subuser_hash>";
String urlString = String.format("https://resi-api.iproyal.com/v1/residential-subusers/%s/take-traffic", subuserHash);
String jsonData = String.format("{\"amount\": %s}", 5.0);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Bearer " + apiToken);
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
OutputStream os = connection.getOutputStream();
os.write(jsonData.getBytes());
os.flush();
os.close();
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("POST request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_api_token>"
subuserHash = "<subuser_hash>"
)
func main() {
url := fmt.Sprintf("https://resi-api.iproyal.com/v1/residential-subusers/%s/take-traffic", subuserHash)
data := map[string]interface{}{
"amount": 5.0,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("Authorization", "Bearer "+apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
fmt.Println(string(responseBody))
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_api_token>";
string hash = "<subuser_hash>";
string url = $"https://resi-api.iproyal.com/v1/residential-subusers/{hash}/take-traffic";
var data = new
{
amount = 5.0
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiToken}");
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseText);
}
}
}{
"id": 5,
"hash": "02JVRQ5BF83PTW19G1SRD955J0",
"username": "new_username",
"password": "new_password",
"traffic_available": 10,
"traffic_used": 0
}GET /orders
Query Parameters
Example request:
Example response:
GET /orders/{order_id}
Example request:
Example response:
GET /orders/calculate-pricing
Query Parameters
Example request:
Example response:
POST /orders
Body Parameters
Example request:
Example response:
POST /orders/{order_id}/extend
Body Parameters
Example request:
Example response:
POST /orders/toggle-auto-extend
Body parameters
Example request:
Example response:
GET /orders
Query Parameters
Example request:
Example response:
GET /orders/{order_id}
Example request:
Example response:
GET /orders/calculate-pricing
Query Parameters
Example request:
Example response:
POST /orders
Body Parameters:
Example request:
Example response:
POST /orders/{order_id}/extend
Body Parameters
Example request:
Example response:
POST /orders/toggle-auto-extend
Body parameters
Example request:
Example response:
location_id
Integer
Location id
status
String
Order status
note_search
String
Phrases in order's note field to search by
order_ids
Array
Order ids to get
sort_by
String
Column to sort by. Required with order
order
String
Sort order. Required with sort_by
statuses
Array
Order statuses. Must contain only values from the available options.
status_is_expiring_soon
Boolean
Is order expiring soon
order_billing_type
String
Order billing type
quantity
Integer
Proxy quantity
coupon_code
String
Coupon code
order_id
Integer
Order id
order_billing_type
String
Order billing type
product_question_answers
Array
Product question answers
coupon_code
String
Coupon code
auto_extend
Boolean
Should the order be extended automatically. Default value is false.
product_question_answers
Array
Answers to questions
card_id
Integer
Card id. If an order is paid by card, the card_id must be provided; otherwise, it will be treated as a balance purchase.
selection
Array
You can provide multiple locations with their quantities using the selection.locations field. When you use this, you do not need to specify product_plan_id and quantity as top-level parameters in the request body.
payment_type
String
Payment type for the extend. Not required if is_enabled is false
card_id
Integer
The id of the card used to pay for the extend. Not required if payment_type is balance
product_id
Integer
Product id
page
Integer
Number of page
per_page
Integer
Number of orders to get per page
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
quantity
Integer
Proxy quantity
product_plan_id
Integer
Product plan id
card_id
Integer
Card id. If an order extend is paid by card, the card_id must be provided; otherwise, it will be treated as a balance purchase.
proxies
Array
Optional list of IP addresses to extend. If omitted or empty, all proxies for the order are extended.
order_id
Integer
Order id
is_enabled
Boolean
Should the auto extend be enabled or disabled
product_plan_id
Integer
The product plan ID for the order. This is not required, and will default to the current product id of the order if empty
location_id
Integer
Location id
status
String
Order status
note_search
String
Phrases in order's note field to search by
order_ids
Array
Order ids to get
sort_by
String
Column to sort by. Required with order
order
String
Sort order. Required with sort_by
statuses
Array
Order statuses. Must contain only values from the available options.
status_is_expiring_soon
Boolean
Is order expiring soon
order_billing_type
String
Order billing type
quantity
Integer
Proxy quantity
coupon_code
String
Coupon code
order_id
Integer
Order id
order_billing_type
String
Order billing type
product_question_answers
Array
Product question answers
coupon_code
String
Coupon code
auto_extend
Boolean
Should the order be extended automatically. Default value is false.
product_question_answers
Array
Answers to questions
card_id
Integer
Card id. If an order is paid by card, the card_id must be provided; otherwise, it will be treated as a balance purchase.
selection
Array
You can provide multiple locations with their quantities using the selection.locations field. When you use this, you do not need to specify product_plan_id and quantity as top-level parameters in the request body.
payment_type
String
Payment type for the extend. Not required if is_enabled is false
card_id
Integer
The id of the card used to pay for the extend. Not required if payment_type is balance
product_id
Integer
Product id
page
Integer
Number of page
per_page
Integer
Number of orders to get per page
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
product_id
Integer
Product id
product_plan_id
Integer
Product plan id
product_location_id
Integer
Product location id
quantity
Integer
Proxy quantity
product_plan_id
Integer
Product plan id
card_id
Integer
Card id. If an order extend is paid by card, the card_id must be provided; otherwise, it will be treated as a balance purchase.
proxies
Array
Optional list of IP addresses to extend. If omitted or empty, all proxies for the order are extended.
order_id
Integer
Order id
is_enabled
Boolean
Should the auto extend be enabled or disabled
product_plan_id
Integer
The product plan ID for the order. This is not required, and will default to the current product id of the order if empty
curl -X GET "https://apid.iproyal.com/v1/reseller/orders?product_id=123&page=1&per_page=10&location_id=456&status=in-progress¬e_search=example%20note&order_ids[]=789&order_ids[]=1011" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$params = [
'product_id' => 123,
'page' => 1,
'per_page' => 10,
'location_id' => 456,
'status' => 'in-progress',
'note_search' => 'example note',
'order_ids' => [789, 1011]
];
$query = http_build_query($params);
$url = "https://apid.iproyal.com/v1/reseller/orders?$query";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
params = {
'product_id': 123,
'page': 1,
'per_page': 10,
'location_id': 456,
'status': 'in-progress',
'note_search': 'example note',
'order_ids[]': [789, 1011]
}
url = 'https://apid.iproyal.com/v1/reseller/orders'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const params = new URLSearchParams({
product_id: 123,
page: 1,
per_page: 10,
location_id: 456,
status: 'in-progress',
note_search: 'example note',
});
const orderIds = [789, 1011];
orderIds.forEach(id => params.append('order_ids[]', id));
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders?${params.toString()}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/orders";
Map<String, String> params = Map.of(
"product_id", "123",
"page", "1",
"per_page", "10",
"location_id", "456",
"status", "in-progress",
"note_search", "example note"
);
List<String> orderIds = List.of("789", "1011");
StringBuilder queryParams = new StringBuilder();
try {
for (Map.Entry<String, String> entry : params.entrySet()) {
if (queryParams.length() > 0) {
queryParams.append("&");
}
queryParams.append(URLEncoder.encode(entry.getKey(), "UTF-8"))
.append("=")
.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
}
for (String orderId : orderIds) {
if (queryParams.length() > 0) {
queryParams.append("&");
}
queryParams.append(URLEncoder.encode("order_ids[]", "UTF-8"))
.append("=")
.append(URLEncoder.encode(orderId, "UTF-8"));
}
URL url = new URL(urlString + "?" + queryParams.toString());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
)
const (
apiToken = "<your_access_token>"
baseURL = "https://apid.iproyal.com/v1/reseller/orders"
)
func main() {
params := url.Values{}
params.Add("product_id", "123")
params.Add("page", "1")
params.Add("per_page", "10")
params.Add("location_id", "456")
params.Add("status", "in-progress")
params.Add("note_search", "example note")
orderIds := []string{"789", "1011"}
for _, id := range orderIds {
params.Add("order_ids[]", id)
}
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, err := http.NewRequest(http.MethodGet, fullURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}
using System.Text.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders";
var queryParams = new Dictionary<string, string>
{
{ "product_id", "123" },
{ "page", "1" },
{ "per_page", "10" },
{ "location_id", "456" },
{ "status", "in-progress" },
{ "note_search", "example note" },
};
List<string> orderIds = new List<string> { "789", "1011" };
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var query = new List<string>();
foreach (var param in queryParams)
{
query.Add($"{Uri.EscapeDataString(param.Key)}={Uri.EscapeDataString(param.Value)}");
}
foreach (var orderId in orderIds)
{
query.Add($"{Uri.EscapeDataString("order_ids[]")}={Uri.EscapeDataString(orderId)}");
}
string queryString = string.Join("&", query);
string urlWithParams = $"{url}?{queryString}";
HttpResponseMessage response = await client.GetAsync(urlWithParams);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "confirmed",
"location": "United States",
"locations": "United States",
"quantity": 5,
"questions_answers": [
{
"question": "Extra requirements (if you have any):",
"answer": "I need 128.158.97"
}
],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
},
...
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://apid.iproyal.com/v1/reseller/orders",
"per_page": 10,
"to": 10,
"total": 14
}
}curl -X GET "https://apid.iproyal.com/v1/reseller/orders/12345" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$url = "https://apid.iproyal.com/v1/reseller/orders/$order_id";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/orders/{order_id}'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/${order_id}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
int orderId = 12345;
String urlString = String.format("https://apid.iproyal.com/v1/reseller/orders/%d", orderId);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/orders/%d", orderID)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/orders/{orderId}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada"
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X GET "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing?product_id=123&product_plan_id=456&product_location_id=789&quantity=10&coupon_code=DISCOUNT2024" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$params = [
'product_id' => 123,
'product_plan_id' => 456,
'product_location_id' => 789,
'quantity' => 10,
'coupon_code' => 'DISCOUNT2024'
];
$query = http_build_query($params);
$url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing?$query";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
params = {
'product_id': 123,
'product_plan_id': 456,
'product_location_id': 789,
'quantity': 10,
'coupon_code': 'DISCOUNT2024'
}
url = 'https://apid.iproyal.com/v1/reseller/orders/calculate-pricing'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const params = new URLSearchParams({
product_id: 123,
product_plan_id: 456,
product_location_id: 789,
quantity: 10,
coupon_code: 'DISCOUNT2024'
}).toString();
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/calculate-pricing?${params}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing" +
"?product_id=123&product_plan_id=456&product_location_id=789&quantity=10&coupon_code=DISCOUNT2024";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
)
const (
apiToken = "<your_access_token>"
baseURL = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing"
)
func main() {
params := url.Values{}
params.Add("product_id", fmt.Sprintf("%d", 123))
params.Add("product_plan_id", fmt.Sprintf("%d", 456))
params.Add("product_location_id", fmt.Sprintf("%d", 789))
params.Add("quantity", fmt.Sprintf("%d", 10))
params.Add("coupon_code", "DISCOUNT2024")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, err := http.NewRequest(http.MethodGet, fullURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Text.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing";
var queryParams = new Dictionary<string, string>
{
{ "product_id", "123" },
{ "product_plan_id", "456" },
{ "product_location_id", "789" },
{ "quantity", "10" },
{ "coupon_code", "DISCOUNT2024" }
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var urlWithParams = new UriBuilder(url) { Query = await new FormUrlEncodedContent(queryParams).ReadAsStringAsync() }.ToString();
HttpResponseMessage response = await client.GetAsync(urlWithParams);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"pre_discount_price": 30,
"price_with_vat": 30,
"vat": null,
"price": 30,
"pre_discount_price_per_item": 3,
"price_per_item": 3,
"plan_discount_percent": 0,
"location_discount_percent": 0,
"coupon_discount_percent": 0,
"quantity_discount_percent": 0,
"total_discount_percent": 0,
"quantity_required_for_next_discount": {
"quantity": 90,
"discount": 5
},
"message": null
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": {
"question_id_1": "answer_1",
"question_id_2": "answer_2"
},
"card_id": 1,
"selection": {
"locations": [
{
"product_location_id": 789,
"quantity": 10
}
]
}
}'<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/orders";
$data = [
'product_id' => 123,
'product_plan_id' => 456,
'coupon_code' => 'DISCOUNT2024',
'auto_extend' => true,
'product_question_answers' => [
'question_id_1' => 'answer_1',
'question_id_2' => 'answer_2'
],
'card_id' => 1,
'selection' => [
'locations' => [
['product_location_id' => 789, 'quantity' => 10]
]
]
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/orders'
data = {
'product_id': 123,
'product_plan_id': 456,
'coupon_code': 'DISCOUNT2024',
'auto_extend': True,
'product_question_answers': {
'question_id_1': 'answer_1',
'question_id_2': 'answer_2'
},
'card_id': 1,
'selection': {
'locations': [
{'product_location_id': 789, 'quantity': 10}
]
}
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const data = JSON.stringify({
product_id: 123,
product_plan_id: 456,
coupon_code: 'DISCOUNT2024',
auto_extend: true,
product_question_answers: {
question_id_1: 'answer_1',
question_id_2: 'answer_2'
},
card_id: 1,
selection: {
locations: [
{ product_location_id: 789, quantity: 10 },
]
}
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders";
String requestBody = """
{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": {
"question_id_1": "answer_1",
"question_id_2": "answer_2"
},
"card_id" 1,
"selection": {
"locations": [
{ "product_location_id": 789, "quantity": 10 },
]
}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/orders"
)
func main() {
data := map[string]interface{}{
"product_id": 123,
"quantity": 10,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": map[string]string{
"question_id_1": "answer_1",
"question_id_2": "answer_2",
},
"card_id": 1,
"selection": map[string]interface{}{
"locations": []map[string]interface{}{
{"product_location_id": 789, "quantity": 10},
},
},
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders";
var data = new
{
product_id = 123,
product_plan_id = 456,
coupon_code = "DISCOUNT2024",
auto_extend = true,
product_question_answers = new
{
question_id_1 = "answer_1",
question_id_2 = "answer_2"
},
card_id = 1,
selection = new
{
locations = new[]
{
new { product_location_id = 789, quantity = 10 },
}
}
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/12345/extend" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_plan_id": 678,
"card_id": 1,
"proxies": []
}'<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$product_plan_id = 678;
$url = "https://apid.iproyal.com/v1/reseller/orders/$order_id/extend";
$data = [
'product_plan_id' => $product_plan_id,
'card_id' => 1,
'proxies' => []
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/orders/{order_id}/extend'
data = {
'product_plan_id': 678,
'card_id': 1,
'proxies': []
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const data = JSON.stringify({
product_plan_id: 678,
card_id: 1,
proxies: []
});
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/${order_id}/extend`,
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String orderId = "12345";
String url = "https://apid.iproyal.com/v1/reseller/orders/" + orderId + "/extend";
String requestBody = """
{
"product_plan_id": 678,
"card_id": 1,
"proxies": []
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/orders/%d/extend", orderID)
data := map[string]interface{}{
"product_plan_id": 678,
"card_id": 1,
"proxies": []string{}
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/orders/{orderId}/extend";
var data = new
{
product_plan_id = 678,
card_id = 1,
proxies = Array.Empty<string>()
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": [],
"extended_proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1
}'<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
$data = [
'order_id' => 123,
'product_plan_id' => 3,
'is_enabled' => true,
'payment_type' => 'card',
'card_id' => 1
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend'
data = {
'order_id': 123,
'product_plan_id': 3,
'is_enabled': True,
'payment_type': 'card',
'card_id': 1
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const data = JSON.stringify({
order_id: 123,
product_plan_id: 3,
is_enabled: true,
payment_type: 'card',
card_id: 1
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders/toggle-auto-extend',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
String requestBody = """
{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend"
)
func main() {
data := map[string]interface{}{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
var data = new
{
order_id = 123,
product_plan_id = 3,
is_enabled = true,
payment_type = "card",
card_id = 1
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"order_id": 202,
"is_enabled": true,
"product_plan_id": 3,
"payment_type": "balance",
"card_id": null
}curl -X GET "https://apid.iproyal.com/v1/reseller/orders?product_id=123&page=1&per_page=10&location_id=456&status=in-progress¬e_search=example%20note&order_ids[]=789&order_ids[]=1011" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$params = [
'product_id' => 123,
'page' => 1,
'per_page' => 10,
'location_id' => 456,
'status' => 'in-progress',
'note_search' => 'example note',
'order_ids' => [789, 1011]
];
$query = http_build_query($params);
$url = "https://apid.iproyal.com/v1/reseller/orders?$query";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
params = {
'product_id': 123,
'page': 1,
'per_page': 10,
'location_id': 456,
'status': 'in-progress',
'note_search': 'example note',
'order_ids[]': [789, 1011]
}
url = 'https://apid.iproyal.com/v1/reseller/orders'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const params = new URLSearchParams({
product_id: 123,
page: 1,
per_page: 10,
location_id: 456,
status: 'in-progress',
note_search: 'example note',
});
const orderIds = [789, 1011];
orderIds.forEach(id => params.append('order_ids[]', id));
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders?${params.toString()}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
String urlString = "https://apid.iproyal.com/v1/reseller/orders";
Map<String, String> params = Map.of(
"product_id", "123",
"page", "1",
"per_page", "10",
"location_id", "456",
"status", "in-progress",
"note_search", "example note"
);
List<String> orderIds = List.of("789", "1011");
StringBuilder queryParams = new StringBuilder();
try {
for (Map.Entry<String, String> entry : params.entrySet()) {
if (queryParams.length() > 0) {
queryParams.append("&");
}
queryParams.append(URLEncoder.encode(entry.getKey(), "UTF-8"))
.append("=")
.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
}
for (String orderId : orderIds) {
if (queryParams.length() > 0) {
queryParams.append("&");
}
queryParams.append(URLEncoder.encode("order_ids[]", "UTF-8"))
.append("=")
.append(URLEncoder.encode(orderId, "UTF-8"));
}
URL url = new URL(urlString + "?" + queryParams.toString());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
)
const (
apiToken = "<your_access_token>"
baseURL = "https://apid.iproyal.com/v1/reseller/orders"
)
func main() {
params := url.Values{}
params.Add("product_id", "123")
params.Add("page", "1")
params.Add("per_page", "10")
params.Add("location_id", "456")
params.Add("status", "in-progress")
params.Add("note_search", "example note")
orderIds := []string{"789", "1011"}
for _, id := range orderIds {
params.Add("order_ids[]", id)
}
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, err := http.NewRequest(http.MethodGet, fullURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System.Text.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders";
var queryParams = new Dictionary<string, string>
{
{ "product_id", "123" },
{ "page", "1" },
{ "per_page", "10" },
{ "location_id", "456" },
{ "status", "in-progress" },
{ "note_search", "example note" },
};
List<string> orderIds = new List<string> { "789", "1011" };
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var query = new List<string>();
foreach (var param in queryParams)
{
query.Add($"{Uri.EscapeDataString(param.Key)}={Uri.EscapeDataString(param.Value)}");
}
foreach (var orderId in orderIds)
{
query.Add($"{Uri.EscapeDataString("order_ids[]")}={Uri.EscapeDataString(orderId)}");
}
string queryString = string.Join("&", query);
string urlWithParams = $"{url}?{queryString}";
HttpResponseMessage response = await client.GetAsync(urlWithParams);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"data": [
{
"id": 420,
"note": null,
"product_name": "Static Residential",
"expire_date": "2024-04-20 10:25:12",
"plan_name": "30 Days",
"status": "confirmed",
"location": "United States",
"locations": "United States",
"quantity": 5,
"questions_answers": [
{
"question": "Extra requirements (if you have any):",
"answer": "I need 128.158.97"
}
],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
},
...
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://apid.iproyal.com/v1/reseller/orders",
"per_page": 10,
"to": 10,
"total": 14
}
}curl -X GET "https://apid.iproyal.com/v1/reseller/orders/12345" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$url = "https://apid.iproyal.com/v1/reseller/orders/$order_id";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/orders/{order_id}'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/${order_id}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
String apiToken = "<your_access_token>";
int orderId = 12345;
String urlString = String.format("https://apid.iproyal.com/v1/reseller/orders/%d", orderId);
try {
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("X-Access-Token", apiToken);
connection.setRequestProperty("Content-Type", "application/json");
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println("Response Body: " + content.toString());
} else {
System.out.println("GET request failed. Response Code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/orders/%d", orderID)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/orders/{orderId}";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
HttpResponseMessage response = await client.GetAsync(url);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"expire_date": "2024-04-20 10:25:12",
"plan_name": "30 Days",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X GET "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing?product_id=123&product_plan_id=456&product_location_id=789&quantity=10&coupon_code=DISCOUNT2024" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"<?php
$api_token = '<your_access_token>';
$params = [
'product_id' => 123,
'product_plan_id' => 456,
'product_location_id' => 789,
'quantity' => 10,
'coupon_code' => 'DISCOUNT2024'
];
$query = http_build_query($params);
$url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing?$query";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
params = {
'product_id': 123,
'product_plan_id': 456,
'product_location_id': 789,
'quantity': 10,
'coupon_code': 'DISCOUNT2024'
}
url = 'https://apid.iproyal.com/v1/reseller/orders/calculate-pricing'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const params = new URLSearchParams({
product_id: 123,
product_plan_id: 456,
product_location_id: 789,
quantity: 10,
coupon_code: 'DISCOUNT2024'
}).toString();
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/calculate-pricing?${params}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing" +
"?product_id=123&product_plan_id=456&product_location_id=789&quantity=10&coupon_code=DISCOUNT2024";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
)
const (
apiToken = "<your_access_token>"
baseURL = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing"
)
func main() {
params := url.Values{}
params.Add("product_id", fmt.Sprintf("%d", 123))
params.Add("product_plan_id", fmt.Sprintf("%d", 456))
params.Add("product_location_id", fmt.Sprintf("%d", 789))
params.Add("quantity", fmt.Sprintf("%d", 10))
params.Add("coupon_code", "DISCOUNT2024")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, err := http.NewRequest(http.MethodGet, fullURL, nil)
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Text.Json;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders/calculate-pricing";
var queryParams = new Dictionary<string, string>
{
{ "product_id", "123" },
{ "product_plan_id", "456" },
{ "product_location_id", "789" },
{ "quantity", "10" },
{ "coupon_code", "DISCOUNT2024" }
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var urlWithParams = new UriBuilder(url) { Query = await new FormUrlEncodedContent(queryParams).ReadAsStringAsync() }.ToString();
HttpResponseMessage response = await client.GetAsync(urlWithParams);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"pre_discount_price": 30,
"price_with_vat": 30,
"vat": null,
"price": 30,
"pre_discount_price_per_item": 3,
"price_per_item": 3,
"plan_discount_percent": 0,
"location_discount_percent": 0,
"coupon_discount_percent": 0,
"quantity_discount_percent": 0,
"total_discount_percent": 0,
"quantity_required_for_next_discount": {
"quantity": 90,
"discount": 5
},
"message": null
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": {
"question_id_1": "answer_1",
"question_id_2": "answer_2"
},
"card_id": 1,
"selection": {
"locations": [
{
"product_location_id": 789,
"quantity": 10
}
]
}
}'<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/orders";
$data = [
'product_id' => 123,
'product_plan_id' => 456,
'coupon_code' => 'DISCOUNT2024',
'auto_extend' => true,
'product_question_answers' => [
'question_id_1' => 'answer_1',
'question_id_2' => 'answer_2'
],
'card_id' => 1,
'selection' => [
'locations' => [
['product_location_id' => 789, 'quantity' => 10]
]
]
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/orders'
data = {
'product_id': 123,
'product_plan_id': 456,
'coupon_code': 'DISCOUNT2024',
'auto_extend': True,
'product_question_answers': {
'question_id_1': 'answer_1',
'question_id_2': 'answer_2'
},
'card_id': 1,
'selection': {
'locations': [
{'product_location_id': 789, 'quantity': 10}
]
}
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const data = JSON.stringify({
product_id: 123,
product_plan_id: 456,
coupon_code: 'DISCOUNT2024',
auto_extend: true,
product_question_answers: {
question_id_1: 'answer_1',
question_id_2: 'answer_2'
},
card_id: 1,
selection: {
locations: [
{ product_location_id: 789, quantity: 10 }
]
}
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders";
String requestBody = """
{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": {
"question_id_1": "answer_1",
"question_id_2": "answer_2"
},
"card_id": 1,
"selection": {
"locations": [
{ "product_location_id": 789, "quantity": 10 },
]
}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/orders"
)
func main() {
data := map[string]interface{}{
"product_id": 123,
"product_plan_id": 456,
"coupon_code": "DISCOUNT2024",
"auto_extend": true,
"product_question_answers": map[string]string{
"question_id_1": "answer_1",
"question_id_2": "answer_2",
},
"card_id": 1,
"selection": map[string]interface{}{
"locations": []map[string]interface{}{
{"product_location_id": 789, "quantity": 10},
},
},
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders";
var data = new
{
product_id = 123,
product_plan_id = 456,
coupon_code = "DISCOUNT2024",
auto_extend = true,
product_question_answers = new
{
question_id_1 = "answer_1",
question_id_2 = "answer_2"
},
card_id = 1,
selection = new
{
locations = new[]
{
new { product_location_id = 789, quantity = 10 },
}
}
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/12345/extend" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"product_plan_id": 678,
"card_id": 1,
"proxies": []
}'<?php
$api_token = '<your_access_token>';
$order_id = 12345;
$product_plan_id = 678;
$url = "https://apid.iproyal.com/v1/reseller/orders/$order_id/extend";
$data = [
'product_plan_id' => $product_plan_id,
'card_id' => 1,
'proxies' => []
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
order_id = 12345
url = f'https://apid.iproyal.com/v1/reseller/orders/{order_id}/extend'
data = {
'product_plan_id': 678,
'card_id': 1,
'proxies' => []
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const order_id = 12345;
const data = JSON.stringify({
product_plan_id: 678,
card_id: 1,
proxies: []
});
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/orders/${order_id}/extend`,
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String orderId = "12345";
String url = "https://apid.iproyal.com/v1/reseller/orders/" + orderId + "/extend";
String requestBody = """
{
"product_plan_id": 678,
"card_id": 1,
"proxies": []
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
orderID = 12345
)
func main() {
url := fmt.Sprintf("https://apid.iproyal.com/v1/reseller/orders/%d/extend", orderID)
data := map[string]interface{}{
"product_plan_id": 678,
"card_id": 1,
"proxies": []string{}
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
int orderId = 12345;
string url = $"https://apid.iproyal.com/v1/reseller/orders/{orderId}/extend";
var data = new
{
product_plan_id = 678,
card_id = 1,
proxies = Array.Empty<string>()
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"id": 420,
"note": null,
"product_name": "Static Residential",
"plan_name": "30 Days",
"expire_date": "2024-04-20 10:25:12",
"status": "expired",
"location": "Canada",
"locations": "Canada",
"quantity": 5,
"questions_answers": [],
"proxy_data": {
"ports": {
"socks5": 12324,
"http|https": 12323
},
"proxies": [],
"extended_proxies": []
},
"auto_extend_settings": null,
"extended_history": []
}curl -X POST "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1
}'<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
$data = [
'order_id' => 123,
'product_plan_id' => 3,
'is_enabled' => true,
'payment_type' => 'card',
'card_id' => 1
];
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend'
data = {
'order_id': 123,
'product_plan_id': 3,
'is_enabled': True,
'payment_type': 'card',
'card_id': 1
}
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.status_code)
print(response.json())const https = require('https');
const api_token = '<your_access_token>';
const data = JSON.stringify({
order_id: 123,
product_plan_id: 3,
is_enabled: true,
payment_type: 'card',
card_id: 1
});
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/orders/toggle-auto-extend',
method: 'POST',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String accessToken = "<your_access_token>";
String url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
String requestBody = """
{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-Access-Token", accessToken)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Response Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
}
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const (
apiToken = "<your_access_token>"
url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend"
)
func main() {
data := map[string]interface{}{
"order_id": 123,
"product_plan_id": 3,
"is_enabled": true,
"payment_type": "card",
"card_id": 1,
}
jsonData, err := json.Marshal(data)
if err != nil {
log.Fatal("Error marshaling JSON:", err)
}
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal("Error creating request:", err)
}
req.Header.Set("X-Access-Token", apiToken)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal("Error making request:", err)
}
defer resp.Body.Close()
fmt.Println("Status Code:", resp.StatusCode)
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading response body:", err)
}
var jsonResponse map[string]interface{}
err = json.Unmarshal(responseBody, &jsonResponse)
if err != nil {
log.Fatal("Error unmarshaling JSON:", err)
}
fmt.Printf("%+v\n", jsonResponse)
}
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string apiToken = "<your_access_token>";
string url = "https://apid.iproyal.com/v1/reseller/orders/toggle-auto-extend";
var data = new
{
order_id = 123,
product_plan_id = 3,
is_enabled = true,
payment_type = "card",
card_id = 1
};
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Access-Token", apiToken);
var jsonData = JsonSerializer.Serialize(data);
var content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync(url, content);
Console.WriteLine((int)response.StatusCode);
string responseText = await response.Content.ReadAsStringAsync();
var jsonResponse = JsonSerializer.Deserialize<JsonElement>(responseText);
Console.WriteLine(jsonResponse);
}
}
}{
"order_id": 202,
"is_enabled": true,
"product_plan_id": 3,
"payment_type": "balance",
"card_id": null
}unpaid
in-progress
confirmed
refunded
expiredasc
descunpaid
in-progress
confirmed
refunded
expiredsubscription
regularsubscription
regular{ question_id: answer, ... }card
balanceunpaid
in-progress
confirmed
refunded
expiredasc
descunpaid
in-progress
confirmed
refunded
expiredsubscription
regularsubscription
regular{ question_id: answer, ... }card
balance