Skip to content
A Swift package used to communicate with the Telesign API
Swift
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/TelesignKit
Tests
Package.swift
README.md

README.md

TelesignKit

TelesignKit is a Swift package used to communicate with the Telesign API for Server Side Swift Apps.

What's Telesign?

Telesign is a Communication Platform as a Service. Allowing you to send SMS messages for your use case, text to voice communications, phone identification to reduce risk/fraud and many other things.

Installation

To start using TelesignKit, in your Package.swift, add the following

.package(url: "https://github.com/vapor-community/telesignkit.git", from: "1.0.0")

Using the API

In your main.swift simply create a TelesignClient:

import NIO
import TelesignKit

let eventloop: EventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)


let client = TelesignClient(eventLoop: eventloop,
                            apiKey: "YOUR_API_KEY",
                            customerId: "YOUR_CUSTOMER_ID")

do {
    let result = try client.messaging.send(phoneNumber: "11234567890",
                                           message: "Hello Telesign!",
                                           messageType: .ARN).wait()
    print(result)
} catch {
    print(error)
}

Supports the following APIs

  • Messaging
  • PhoneId
  • Score
You can’t perform that action at this time.