Query notification service IP address

Updated

Retrieves Agora message notification service IP addresses.

gethttps://api.agora.io/v2/ncs/ip

When using Agora real-time audio and video, you can use the Agora Notifications service to receive channel events.

After activating the service, when a channel event occurs, the Agora Notifications service server will deliver the event notification to your message receiving server.

If your server is behind a firewall, you need to call the IP address query API to retrieve the IP addresses of Agora Notifications service and configure your firewall to trust all these IP addresses.

Agora adjusts the Agora Notifications service IP addresses every 24 hours. Best practice is to call this endpoint at least every 24 hours and automatically update the firewall configuration.

  • Method: GET
  • Endpoint: https://api.agora.io/v2/ncs/ip

Note

If your server is behind a firewall, configure your firewall to trust the returned IP addresses. Agora adjusts message notification service IP addresses every 24 hours. Best practice is to call this endpoint at least every 24 hours and automatically update the firewall configuration.

Response Body

application/json

application/json

Response schema

200application/json

The request succeeded and returned notification service IP addresses.

data#optionalobject
defaultapplication/json

The request failed. A 401 (Unauthorized) response status code means the request is not authorized.

status#optionalstring

Request status.

message#optionalstring

Description of why the request failed.

Authorization

This endpoint requires authentication.

basicAuthhmacAuth

Request examples

curl -X GET "https://example.com/v2/ncs/ip"

Response example

{  "data": {    "service": {      "hosts": [        {          "primaryIP": "string"        }      ]    }  }}
{  "status": "error",  "message": "Describes why the request failed."}