Wix is a cloud-based platform with a dynamic IP address. With the Static IP Request package, you can easily get a static IP address for your Wix site, enabling you to perform HTTP requests from your Wix site to 3rd-party services that require a static IP address for authentication.
Before using this package, set up the following:
Copy the Proxy Address, Port, Username, and Password for later use.
endpointApiKey
: Your 3rd-party service endpoint API key (if required by the 3rd-party service).proxyUsername
: Your proxy user name.proxyPswd
: Your proxy password.baseURL
: 3rd-party service URL (optional).Proxy host
: Proxy address from your proxy provider (required).Proxy port
: Proxy port from your proxy provider (required).The following backend files are included in the package.
static-ip.js
The code in this file contains the function responsible for sending HTTP requests to a 3rd-party service that requires static IP authentication. The function can be used in your backend/page/public code by importing it with the following syntax:
Note that only the exported function you can use on your site is listed here.
sendCustomHttpRequest(configs)
Sends an HTTP Request to the 3rd-party service that requires a static IP authentication with the provided configurations.
configs
: Object containing the following configuration.
url
: URL for the request. Can be an absolute URL, https://some-domain.com/api-endpoint
, or just the endpoint /api-endpoint
. If just the endpoint is provided, the url
will be appended to the baseUrl
, building the absolute URL for the request.
method
: Request method. Can be POST, GET, PATCH, DELETE, PUT, HEAD, REQUEST, getUrl, or OPTIONS. Defaults to GET
.
data
: Request body data. Only applicable for POST, PUT, DELETE, and PATCH methods.
params
: Request parameters (optional).
headers
: Request headers, endpointAuthorization
from proxy provider’s Username and Password (required), and endpointAuthorization
from the 3rd-party service endpoint API key (if applicable).
otherConfigs
: Other configurations to add to the request (optional). For example, timeout.
If successful, a Promise that resolves to an object containing all configurations. Otherwise, an error message.
This Velo package uses the following npm package. To view the npm license, see the npm readme.
Release Notes
1.0 Initial version.
Tags
#staticIP #IPauthentication, #proxy