Skip to main content

Query notification service IP address

GET
https://api.agora.io/v2/ncs/ip

Use this endpoint to retrieve the IP addresses of the Notifications server. If your server is behind a firewall, add these IP addresses to your allowlist to receive channel event notifications.

tip

Agora occasionally adjusts the Notifications IP addresses. Call this endpoint at least every 24 hours and automatically update your firewall configuration with the latest addresses.

Request

The request URL and request body is case-sensitive. All requests must use HTTPS.

Request header

  • Content-Type: application/json
  • The request header must contain the Authorization field. For details, see RESTful authentication.

Response

A 200 status code indicates success. The response body contains the following parameters:

OK
  • data object
    Show propertiesHide properties
    • service object
      Show propertiesHide properties
      • hosts array

        A list of Notifications server host objects.

        Show propertiesHide properties
        • primaryIP string

          The IP address of the Notifications server. Add all IP addresses returned in this field to your firewall allowlist.

If the status code is not 200, the request fails. See the message field in the response body for the reason for this failure. Refer to Response status codes for details.

Authorization

This endpoint requires Basic authentication.

Request example

Use one of the following code examples to test this request:


_4
curl --request GET \
_4
--url https://api.sd-rtn.com/v2/ncs/ip \
_4
--header 'Accept: application/json' \
_4
--header 'Authorization: Basic <your_base64_encoded_credentials>'

Response example


_14
{
_14
"data": {
_14
"service": {
_14
"hosts": [
_14
{
_14
"primaryIP": "xxx.xxx.xxx.xxx"
_14
},
_14
{
_14
"primaryIP": "xxx.xxx.xxx.xxx"
_14
}
_14
]
_14
}
_14
}
_14
}