App direct connection

With this feature you’ll be able to allow users to connect with your app offline (through a QR code or a dynamic link).

In addition to a regular connection, you’ll receive a callback notification once a user is connected with your app, which means you can use that callback as an entry point to build your business logic, like sending a welcome message.

Let’s see an example for building this feature

Generating a QR code

# Generates a QR code for the connection request
    .as_png(border: 0, size: 400)
    .save('/tmp/qr.png', :interlace => true)
qrdata, _ :={
	Expiry: time.Minute * 5,
// Generates a QR code for the connection request
let buf =

const fs = require(‘fs’).promises; await fs.writeFile(’/tmp/qr.png’, buf);

link ="")
link, err :={
	Expiry: time.Minute * 5, // this is required ?
let link ="")

Subscribing to new connections

# Register an observer for a connection response do |res|
    if res.status == "accepted"
        p "successfully connected", "Hey there! We're connected!")
end, status string) {
	log.Println("Response received from " + iss + " with status " + status)
	parts := strings.Split(iss, ":")[]string{parts[0]}, "Hi there!")
}) any): any => {`connection request ${res.status} by ${}(${res.iss})`), "hi there!")