QR API ACTION
Create Text QR Code
Create a Text QR Code. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's QR API account once, then configure and run Create Text QR Code from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "qr_api-create-text-qrcode",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
qr_api: { authProvisionId: "apn_xxxxxxx" },
filename: "Filename",
size: "Size",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "qr_api-create-text-qrcode",
"configured_props": {
"qr_api": { "authProvisionId": "apn_xxxxxxx" },
"filename": "Filename",
"size": "Size"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "qr_api",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "qr_api-create-text-qrcode",
arguments: {
filename: "Filename",
size: "Size",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
filename Filename | string | The filename that will be used to save in /tmp directory without extension Required |
size Size | string | Parameter valid only if poster.url is not specified. Use this parameter to specify the size preset of the QR Code image (including Quiet Zone which is free area around QR Code to ensure scannability). Optional |
quiteZone Quiet Zone | string | Parameter valid only if poster.url is not specified. Use this parameter to specify the size of the Quiet Zone (which is free area around QR Code to ensure scannability). Set the Quiet Zone within a range of 0 to 12 (where 0 indicates no Quiet Zone and 12 the maximum). Tip: To achieve high scannability, it is recommended to set the Quiet Zone value to at least 4 or higher. Optional |
customSize Custom Size | integer | Parameter valid only if parameter size is set to custom. Use this parameter to specify the custom size of the QR Code image in pixels (including Quiet Zone, which is free area around QR Code to ensure scannability). Optional |
errorCorrection Error Correction | string | Use this parameter to set error correction level of the QR Code. Error Correction helps maintain scannability of the QR Code even if there is some damage to data modules. Error correction is measured in damage in percentage (%) that it can sustain. Values are L (~7%), M (~15%), Q (~25%), and H (~30%). Optional |
dataPattern Data Pattern | string | Parameter valid and required only if poster.url is not specified. Use this parameter to edit the pattern of data modules of the QR Code. Choose pattern value from drop-down. View all the data patterns here. Optional |
eyePattern Eye Pattern | string | Parameter valid and required only if poster.url is not specified. Use this parameter to edit the pattern of the eyes (position markers in the three corners) of the QR Code. Choose pattern value from drop-down. View all the eye patterns here. Optional |
dataGradientStyle Data Gradient Style | string | Parameter valid and required only if poster.url is not specified. Use this parameter to add a color gradient style to the group of data modules. Choose style value from drop-down. View all the gradient patterns here. Optional |
dataGradientStartColor Data Gradient Start Color | string | Parameter valid and required only if poster.url is not specified. Use this parameter to EITHER add a color (in hex format #000000) to all data modules (if data_gradient_style is set to None) OR to add the start color to data modules (if data_gradient_style is not set to None). Optional |
dataGradientEndColor Data Gradient End Color | string | Parameter valid only if poster.url is not specified and data_gradient_style is not set to None. Use this parameter to set the end color (in hex format #000000) to data modules. Optional |
eyeColorInner Eye Color Inner | string | Parameter valid and required only if poster.url is not specified. Use this parameter to specify color (in hex format #000000) to the inner component of the QR Code (all three) eyes (position markers in the three corners). Optional |
eyeColorOuter Eye Color Outer | string | Parameter valid and required only if poster.url is not specified. Use this parameter to specify color (in hex format #000000) to the outer component of the QR Code (all three) eyes (position markers in the three corners). Optional |
backgroundColor Background Color | string | Parameter valid and required only if poster.url is not specified. Use this parameter to specify color (in hex format #000000) of the QR Codes' background including non-dark data modules. To remove background (i.e. make transparent), use value false. Tip: For highest scannability keep the background color as white i.e. #FFFFFF. Optional |
logoUrl Logo URL | string | Parameter valid only if poster.url is not specified. Use this field if you want to design the QR Code with the 'Custom with Logo' feature. Otherwise, skip. Enter the URL of the image you want as a logo. Tip: Ensure the image source allows cross-domain access. Or simply use the Media feature to upload image and get URL or choose from our list of ready-made logos and icons. See the full list here. Optional |
logoSize Logo Size | integer | Parameter valid only if data in logo.url is specified. Enter the size of the logo image as a percentage (%) of size of logo. Tip: High logo size may make the QR Code unscannable. Test thoroughly before finalizing. Optional |
logoExcavated Logo Excavated | boolean | Parameter valid only if data in logo.url is specified. Use this paramater to specify if the blocks around the logo should be remove (true) or should not be removed (false) Tip: If selecting true, set error correction to a higher-level to ensure loss of blocks doesn't affect scannability. Optional |
logoAngle Logo Angle | integer | Parameter valid only if data in logo.url is specified. Use this parameter if you wish to rotate the image at an angle. Use values 1-359 (degrees) for clockwise rotation and -1 to -359 (degrees) for anti-clockwise rotation. Optional |
logoCache Logo Cache | boolean | Parameter valid and required only if logo.url is specified. By default, it will be set to True. When set to True, the logo image provided will be cached for 10 minutes to improve performance. Set to False only if the image uploaded in the URL provided in logo.url field will change frequently, else skip. Optional |
posterUrl Poster URL | string | Use this field if you want to design the QR Code with the 'Custom with Background' feature. Otherwise, skip. Enter the URL of the image you want as a background image. Tip: Ensure the image source allows cross-domain access. Or simply use the Media feature to upload image and get URL. Optional |
posterLeft Poster Left | integer | Parameter valid only if poster.url is specified. This parameter will help you position the QR Code from the left edge of the uploaded background image. Specify value in percentage (%) where value is the distance between the left-edge of the image and the centre of the QR Code.Tip: Value 50 is placing the QR Code in the centre of the background image in terms of image width. Optional |
posterTop Poster Top | integer | Parameter valid only if poster.url is specified. This parameter will help you position the QR Code from the top edge of the uploaded background image. Specify value in percentage (%) where value is the distance between the top-edge of the image and the centre of the QR Code.Tip: Value 50 is placing the QR Code in the centre of the background image in terms of image height. Optional |
posterSize Poster Size | integer | Parameter valid only if poster.url is specified. This parameter will help you specify the size of the QR Code relative to the size of the uploaded background image. Specify value in percentage (%) where value is the ratio of QR Code size and Uploaded Image size. Optional |
posterEyeshape Poster Eye Shape | string | Parameter valid only if poster.url is specified. Use this parameter to edit the pattern of the eyes (position markers in the three corners) of the QR Code. Choose pattern value from drop-down. View all the poster eye patterns here. Optional |
posterDataPattern Poster Data Pattern | string | Parameter valid only if poster.url is specified. Use this parameter to edit the pattern of data modules of the QR Code. Choose pattern value from drop-down. View all the poster data patterns here. Optional |
format Format | string | Format of QR Code Required |
syncDir SyncDir | dir | Required |
data Text | string | The text to be encoded in the QR Code. Required |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- qr_api-create-text-qrcode
- Version
- 0.0.2
- App
- QR API
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗