Last active
June 28, 2022 15:55
-
-
Save birinder-lobana/333caf8d7a4a294ff504fa053931a292 to your computer and use it in GitHub Desktop.
Create multiple dynamic QR Codes using python SDK
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', | |
'qrCodes': [ | |
{ | |
'intent': 'https://jaydeenrealty.com/123cherry/', | |
'intentType': 'DYNAMIC_REDIRECT', | |
'locatorKeyType': 'SHORT_URL', | |
'dynamicRedirectType': 'NO_SCAN_ID', | |
'status': 'ACTIVE' | |
} | |
] | |
},{ | |
'name': 'Billboard 2', | |
'description': 'Billboard at Yonge and Lawrence for 123 Cherry Street Listing', | |
'qrCodes': [ | |
{ | |
'intent': 'https://jaydeenrealty.com/123cherry/', | |
'intentType': 'DYNAMIC_REDIRECT', | |
'locatorKeyType': 'SHORT_URL', | |
'dynamicRedirectType': 'NO_SCAN_ID', | |
'status': 'ACTIVE' | |
} | |
] | |
},{ | |
'name': 'Billboard 3', | |
'description': 'Billboard at Mt. Pleasant and Eglington for 123 Cherry Street Listing', | |
'qrCodes': [ | |
{ | |
'intent': 'https://jaydeenrealty.com/123cherry/', | |
'intentType': 'DYNAMIC_REDIRECT', | |
'locatorKeyType': 'SHORT_URL', | |
'dynamicRedirectType': 'NO_SCAN_ID', | |
'status': 'ACTIVE' | |
} | |
] | |
}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment