A developer user's API tokens work from any IP address by default, so a token copied out of your integration works from anywhere. IP Restrictions (sometimes called an IP allowlist or IP whitelist) limit a developer user's tokens to the public IP addresses you list, such as your integration's servers. A token used from any other address is rejected.
Before You Begin
- Activation required: IP Restrictions need to be enabled for your account before the IP Restrictions section shows on a developer user. Contact ShipHero Support to have IP Restrictions enabled.
- Fixed public IP addresses: Each address you allow must be a public IP address that does not change, such as a static address from your internet provider or a server with a fixed address. Private addresses, such as "192.168.1.20" or "10.0.0.5", are not accepted.
- Your integration's IP addresses: Ask your integration provider for every public IP address their servers use to call ShipHero.
To create a developer user, see How to Obtain API Access and Refresh Tokens. When a restricted developer user's requests are rejected, see Troubleshooting: Access Blocked by IP Restrictions.
Table of Contents
- How Developer User IP Restrictions Work
- How to Add Allowed IP Addresses to a Developer User
- How to Remove IP Restrictions from a Developer User
How Developer User IP Restrictions Work
Developer user IP restrictions are a list of allowed IP addresses saved on the developer user, not on one token. Every API Access Token and Refresh Token of that developer user follows the list, including tokens created before you added the restriction, so you do not need to create or send new tokens.
- No allowed IPs means no restriction: A developer user without allowed IP addresses can use its tokens from any IP address.
- Single addresses or ranges: An allowed IP can be one address, such as "203.0.113.7", or a range of addresses in CIDR notation, such as "203.0.113.0/24".
- Up to 50 allowed IPs: Each developer user can have up to 50 allowed IP addresses or ranges.
- Changes take effect within about a minute: After you save, ShipHero starts rejecting requests from addresses that are not on the list within about a minute.
- Warehouse restrictions also apply: When a warehouse the developer user works in is also restricted, a request must come from an address that is on both lists.
How to Add Allowed IP Addresses to a Developer User
The IP Restrictions section of a developer user's details holds the list of addresses its tokens can be used from. Add one row for each address or range.
Integrations Stop Working From IP Addresses You Do Not List
Integrations that run in the cloud often call ShipHero from more than one address, or from addresses that change. Before you select Update Developer, confirm with the provider that you have every address they use. Requests from any address you leave out are rejected.
- Go to the My Account > Developer Users page.
- Select Edit on the developer user to open Developer Details.
- In the IP Restrictions section, select Add IP.
- Enter the IP address or range, for example "203.0.113.7" for one address or "203.0.113.0/24" for a range.
- Optional: Enter a Label that says what the address is, for example "Integration server".
- Repeat steps 3 to 5 for each address. ShipHero shows an error under the field when an address is not valid or is private.
- Select Update Developer, then select OK on the "User has been saved." message.
After you save, the badge at the top of the IP Restrictions section shows how many addresses are allowed, for example Restricted to 2 addresses. Each row shows who added the address and when in the Added column.
On the Developer Users page, the developer user shows an IP restricted badge next to Active in the status column.
Pro-Tip
When you are connected from the network you want to allow, select Add my current IP to add your address in one step. The button only shows when ShipHero can see a public address for you.
How to Remove IP Restrictions from a Developer User
Removing every allowed IP address from a developer user lets its tokens work from any IP address again, unless a warehouse restriction also applies.
- Go to the My Account > Developer Users page.
- Select Edit on the developer user.
- In the IP Restrictions section, select the trash icon on each row you want to remove.
- Select Update Developer, then select OK on the "User has been saved." message.
When no rows are left, the badge shows Any IP address and the section shows "No IP restrictions. This developer's tokens work from any IP address."