Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openscreen/sdk

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openscreen/sdk

Generate Unique, Dynamic and trackable QR Codes at scale with Openscreen SDK

  • 1.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Openscreen Node SDK

Openscreen is a software developer platform that allows users to easily generate unique and trackable QR Codes at scale using our Node SDK.

Additional information on using the Node SDK can be found in our developer documentation.

Requirements

If you don't already have an Openscreen account, you can sign up for a free account here.

Installation / Usage

npm install @openscreen/sdk
# or using Yarn
yarn add @openscreen/sdk

CommonJS

const {Openscreen} = require('@openscreen/sdk')

ES6 & TypeScript

import {Openscreen} from '@openscreen/sdk'

Getting Started

Openscreen authenticates your API requests using your account's API key and API secret key. You will also need the ID of the project you wish to work with. Your API key, secret key and project ID can all be found in your by logging into your Openscreen dashboard. The following examples demonstrates how to use these values in the SDK to generate your first QR code.

const {Openscreen} = require('@openscreen/sdk')

const PROJECT_ID = '**PROJECT_ID**'

const os = new Openscreen().config({
  key: '**KEY**',
  secret: '**SECRET**',
})


async function myFirstQRCode(event) {
  const res = await os
    .project(PROJECT_ID)
    .assets()
    .create({
      name: 'Openscreen website',
      description: 'Dynamic QR code to https://openscreen.com',
      qrCodes: [
        {
          intent: 'https://openscreen.com',
          intentType: 'DYNAMIC_REDIRECT',
        },
      ],
    })

  const [qrCode] = res.asset.qrCodes

  await os.saveQrImageDataToFile(qrCode, 'my-first-qr.png')
}

myFirstQRCode().catch(console.error)

Keywords

FAQs

Package last updated on 28 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc