This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initiate the Openscreen node SDK and include the project ID that you recieved using the Openscreen dashboard | |
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
const scanId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
async function main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initiate the Openscreen node SDK and include the project ID that you recieved using the Openscreen dashboard | |
const { Openscreen } = require("@openscreen/sdk"); | |
require('dotenv').config(); | |
const os = new Openscreen().config({key: process.env.OS_API_KEY, secret: process.env.OS_API_SECRET}); | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
const scanId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; | |
async function main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"entityType": "app.scan", | |
"created": "2021-10-07T18:38:06.616Z", | |
"modified": "2021-10-07T18:38:06.616Z", | |
"assetId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"scanId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"projectId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"qrCodeId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"ipAddress": "xx.xxx.xxx.xx", | |
"scanTime": "2021-10-07T18:38:05.557Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') | |
#Create an Asset with a QR code | |
my_asset_response = ospro.project(projectId).assets().create({ | |
'name': '123 Main Steet Sign', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scanId = 'SCANID_FROM_YOUR_APPLICATION' | |
create_contact_by_scan_id = ospro.scan(scanId).contacts().create({ | |
'firstName': 'Brian', | |
'lastName': 'Smith', | |
'emailAddress': 'bsmith@test.com', | |
'mailingAddress': { | |
'address': '123 Street', | |
'city': 'Toronto', | |
'provinceOrState': 'ON', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scanId = create_contact_by_scan_id.contact.customAttributes[0] | |
contactId = create_contact_by_scan_id.contact.contactId | |
sms = ospro.scan(scanId).sms().send({ | |
# You may use an SMS template to send SMS or pass the body as plain text | |
'body': 'Congratulations! You are the winner of our campaign', | |
'contactId': contactId | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') | |
#Create an Asset with a QR code | |
my_asset_response = ospro.project(projectId).assets().create({ | |
'name': '123 Main Steet Sign', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openscreen import Openscreen | |
import os | |
#Obtain your access key and secret from Openscreen Dashboard | |
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET')) | |
#Create a new project on Openscreen Dashboard. Paste the projectId below | |
projectId = os.environ.get('PROJECT_ID') | |
create_assets_by_project_id = ospro.project(projectId).assetsBatch().create([{ | |
'name': 'Billboard 1', | |
'description': 'Billboard at Yonge and Eglington for 123 Cherry Street Listing', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"contact": { | |
"contactId": "864422e9-0741-43e6-8b73-b46ea0c0cc16", | |
"firstName": "Brian", | |
"lastName": "Smith", | |
"emailAddress": "bsmith@test.com", | |
"mailingAddress": { | |
"address": "123 Street", | |
"city": "Toronto", | |
"provinceOrState": "ON", | |
"country": "Canada", |