Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions docs/quick-start/send-a-notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ require 'openssl'

class NotificationAPI
def initialize(client_id, client_secret)
# if in the CA region, use 'https://api.ca.notificationapi.com'
# if in the EU region, use 'https://api.eu.notificationapi.com'
@base_url = 'https://api.notificationapi.com'
@client_id = client_id
@auth_token = Base64.strict_encode64("#{client_id}:#{client_secret}")
# if in the CA region, use 'api.ca.notificationapi.com'
# if in the EU region, use 'api.eu.notificationapi.com'
@http_client = Net::HTTP.new('api.notificationapi.com', 443)
@http_client.use_ssl = true
end
Expand Down Expand Up @@ -200,7 +204,9 @@ values={[
import notificationapi from 'notificationapi-node-server-sdk';
// const notificationapi = require('notificationapi-node-server-sdk').default

// init
// initialize notificationapi (default US region)
// if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
// if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
notificationapi.init('CLIENT_ID', 'CLIENT_SECRET');

// send
Expand Down Expand Up @@ -230,7 +236,9 @@ notificationapi.send({
import asyncio
from notificationapi_python_server_sdk import (notificationapi)

# init
# initialize notificationapi (default US region)
# if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
# if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
notificationapi.init("CLIENT_ID", "CLIENT_SECRET")

# send
Expand Down Expand Up @@ -336,7 +344,9 @@ func main() {
using NotificationApi.Server;
using NotificationApi.Server.Models;

//initialize
// initialize notificationapi (default US region)
// if in the CA region, add 'https://api.ca.notificationapi.com' after boolean argument
// if in the EU region, add 'https://api.eu.notificationapi.com' after boolean argument
var notificationApi = new NotificationApiServer("CLIENT_ID", "CLIENT_SECRET", false);

//send
Expand Down Expand Up @@ -366,7 +376,9 @@ await notificationApi.Send(new SendNotificationData("order_tracking", user)
# require:
require './NotificationAPI'

# init
# initialize notificationapi (default US region)
# if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
# if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
notificationapi = NotificationAPI.new("CLIENT_ID", "CLIENT_SECRET")

# send
Expand Down