> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/scan-barcode-qr-code.md).

# Scan barcode/QR code

The Action Node **Scan Barcode/QR code** may be used to scan Barcodes or QR code&#x73;**.** The Action Node may only be run from devices that have a camera.

{% hint style="info" %}
Showroom: [Scan Barcode/QR code example](https://showroom.appfarm.app/action-nodes/scan-barcode-qrcode), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

{% hint style="info" %}
**Generate and display QR codes**

Appfarm Create supports generating and displaying QR codes. Read more [here](https://docs.appfarm.io/library/ui-components/image.md#generate-and-display-qr-codes).
{% endhint %}

## Settings

If the user declines the request to open the camera, **Scan Barcode/QR Code** will throw *GetUserMediaNotAllowedError* (Appfarm Error Code: 17004). One may use the Catch Exception Action Node to provide feedback to the user in this case.

If the user closes the scanner without scanning, nothing is stored and the action continues. Check the target property afterwards if the next steps need a scanned value.

### Target property

Select the String property where the scanned value is stored.

### Type scope

Select the barcode types the scanner detects: EAN-8, EAN-13, Code 39, Code 128, ITF, RSS-14, QR Code, Data Matrix, and PDF 417. Selecting fewer types speeds up detection. If none are selected, the scanner detects all listed types.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/action-nodes/scan-barcode-qr-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
