Retrieving the IP whitelist for a user allows authorized administrators to review which public IP addresses are permitted to access the Vultr account. This operation is restricted to root users or those with the manage_users
permission, ensuring that only privileged roles can manage access controls. The whitelist supports only public IPs—private addresses are not accepted—and enforces valid subnet sizes: /8
to /32
for IPv4 and /20
to /128
for IPv6. Additionally, the API is idempotent, meaning adding the same IP multiple times has no adverse effect, which simplifies automation and scripting.
Follow this guide to get the IP whitelist for a user using the Vultr API.
Send a GET
request to the Get Users endpoint to view all users and note the user id for the target user.
$ curl "https://api.vultr.com/v2/users" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the List User IP Whitelist endpoint to list all whitelisted IP addresses for a user's whitelist.
$ curl "https://api.vultr.com/v2/users/{user-id}/ip-whitelist" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
No comments yet.