-
Notifications
You must be signed in to change notification settings - Fork 18
How to change your API endpoint?
Antoine Augusti edited this page Nov 30, 2020
·
13 revisions
When setting up your Notify api client for the Canadian endpoint you need to pass a base url parameter before your api key.
Examples:
NotifyClient("https://api.notification.canada.ca", apiKey)
https://github.com/alphagov/notifications-node-client
public NotificationClient(final String apiKey, final String baseUrl) {
https://github.com/alphagov/notifications-java-client
public NotificationClient(string baseUrl, string apiKey)
https://github.com/alphagov/notifications-net-client
See config options: https://github.com/alphagov/notifications-python-client/blob/master/notifications_python_client/base.py#L22
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
]);
See config options: https://github.com/alphagov/notifications-php-client/blob/master/src/Client.php#L84