Language selection

Search

Client Libraries

GC Notify was based on the UK government’s notification system. Therefore, the API is also available using the clients developed by GOV.UK.

Before integrating the API

You will need to change the API endpoint when creating a client.

Java
import uk.gov.service.notify.NotificationClient;

NotificationClient client = new NotificationClient(apiKey, "https://api.notification.canada
.NET
using Notify.Client;

var client = new NotificationClient(apiKey, "https://api.notification.canada.ca");
NodeJS
NotifyClient("https://api.notification.canada.ca", apiKey)
PHP
require __DIR__ . '/vendor/autoload.php';

$notifyClient = new \Alphagov\Notifications\Client([
  'baseUrl' => "https://api.notification.canada.ca",
  'apiKey' => 'your-api-key',
  'httpClient' => new \Http\Adapter\Guzzle6\Client
]);
Python
from notifications_python_client.notifications import NotificationsAPIClient

notifications_client = NotificationsAPIClient(
    api_key,
    base_url="https://api.notification.canada.ca"
)
Ruby
require 'notifications/client'

client = Notifications::Client.new(api_key, "https://api.notification.canada.ca")

Feature differences to keep in mind

Sending files by email is different with GC Notify
Sending letters is not available
Receiving text messages is not available

GOV.UK Notify clients

Date modified: