# README
Go API client for
IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API.
There is no limit to the number of IP addresses that you can allow.
It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses.
See IP Access Management for more information.
Overview
This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version:
- Build date: 2025-08-18T08:58:25.283792Z[Etc/UTC]
- Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import "./"
Documentation for API Endpoints
All URIs are relative to https://api.sendgrid.com
Class | Method | HTTP request | Description |
---|---|---|---|
AddIpToAllowList | AddIpToAllowList | Post /v3/access_settings/whitelist | Add one or more IPs to the allow list |
DeleteAllowedIp | DeleteAllowedIp | Delete /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list |
DeleteAllowedIps | DeleteAllowedIps | Delete /v3/access_settings/whitelist | Remove one or more IPs from the allow list |
GetAllowedIp | GetAllowedIp | Get /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP |
ListAccessActivity | ListAccessActivity | Get /v3/access_settings/activity | Retrieve all recent access attempts |
ListAllowedIp | ListAllowedIp | Get /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs |
Documentation For Models
- AddIpToAllowListRequest
- AddIpToAllowListRequestIpsInner
- DeleteAllowedIpsRequest
- ErrorResponse
- ErrorResponseErrorsInner
- IpAccessManagement2xx
- IpAccessManagement2xxResultInner
- ListAccessActivity200Response
- ListAccessActivity200ResponseResultInner
Documentation For Authorization
BearerAuth
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)