x-get
NFC.cool calls this URL in the background with the result as query parameters. Every outcome arrives here straight away, failures and cancels included.
Required: x-get, x-post or x-success
Other apps and web pages can ask NFC.cool on iPhone to do something and send the result back, following the x-callback-url convention.
Webhooks, Shortcuts and URL schemes are on the developers page.
A link asks NFC.cool to scan one tag and hand its UID back to you, and with ndef=1 the tag’s NDEF message too. It works from any web page or app on the iPhone, with nothing to set up beyond installing NFC.cool. The link follows the x-callback-url convention. Reading tags for other apps and websites is part of NFC.cool Business, the company licence for NFC.cool on iPhone: write to us for one.
https://nfc.cool/x-callback-url/read-uid?<parameters>
nfcforiphone://x-callback-url/read-uid?<parameters>Both forms do the same. Prefer the https one: on an iPhone without NFC.cool it opens a page that says how to get it, instead of failing silently. Put it in a link the person taps; iOS doesn’t open apps for links that a script follows by itself.
NFC.cool comes to the front, names who receives the tag’s ID, and starts the scan. If a read-uid link is already open, the newer link takes it over, and the earlier caller hears cancelled.
x-getNFC.cool calls this URL in the background with the result as query parameters. Every outcome arrives here straight away, failures and cancels included.
Required: x-get, x-post or x-success
x-postNFC.cool POSTs the result here as JSON.
Required: x-get, x-post or x-success
x-successOpened after a successful read, with uid, ndef and state appended. Next to x-get or x-post it only gets state: the UID goes to the server the person was shown and nowhere else.
Required: x-get, x-post or x-success
x-errorOpened when the person closes NFC.cool after a failure, with errorCode, errorMessage and state.
Required: no
x-cancelOpened when the person cancels, with state.
Required: no
stateAny string, for example a one-time request ID. Returned unchanged with every result.
Required: no, but recommended
ndef1 also reads the tag's NDEF message. Without it, nothing but the UID is read.
Required: no
Use x-get or x-post, not both. URL-encode every callback value.
Any web page can open this link, so NFC.cool only calls back to https URLs and to other apps’ URL schemes, such as yourapp://nfc-done; x-get and x-post must be https. Plain http, javascript:, data:, tel:, NFC.cool’s own schemes and system schemes that act by themselves (shortcuts:, itms-services:, mailto:, App-Prefs: and similar) are refused, and a link with any refused callback is ignored.
Uppercase hexadecimal, no separators, most significant byte first. Its length tells the chip families apart:
7 bytes
04A1B2C3D4E5F6
8 bytes
E004015012345678
ISO 15693 UIDs start with E0, in the order printed on the chip and shown by most readers.
With ndef=1, ndef holds the tag’s raw NDEF message, the records without the TLV header, as Base64url without padding (RFC 4648, section 5): - and _ instead of + and /, and no =. It is left out when the tag holds no NDEF message.
// Node.js
const bytes = Buffer.from(ndef, "base64url");# Python
import base64
data = base64.urlsafe_b64decode(ndef + "=" * (-len(ndef) % 4))x-getGET https://your-server.example/nfc?code=abc123&uid=E004015012345678&ndef=0QEFVAJkZUhp&state=7f3c9a
GET https://your-server.example/nfc?code=abc123&error=cancelled&state=7f3c9aYour URL is called as it is, with the result added after the parameters it already has. Every attempt gets exactly one call, so the page waiting for it can stop as soon as it arrives:
cancelledThe person cancelled the scan or closed NFC.cool before reading a tag.
scan-failedNo tag was found in time, or the tag couldn't be read.
business-plan-requiredThis iPhone has no NFC.cool Business access.
After cancelled or scan-failed the person can try again, and a successful read then calls x-get again with the uid: treat the latest call for a state as the answer. Answer with any 2xx status. If a success call fails, NFC.cool offers to send it again.
x-postPOST https://your-server.example/api/uid
Content-Type: application/json
{"uid":"04A1B2C3D4E5F6","state":"7f3c9a","readAt":"2026-11-19T09:30:00Z","ndef":"0QEFVAJkZUhp"}Answer with any 2xx status within 20 seconds. Anything else counts as a failure: the person can send it again, and closing NFC.cool reports delivery-failed to x-error. Use x-post when the page that started the read can’t be reopened by URL, for example a web view inside another app; the person goes back with the link iOS shows in the top-left corner.
NFC.cool sends no cookies with x-get or x-post. Recognize the request by the one-time state you put in the link.
x-error codesbusiness-plan-requiredThis iPhone has no NFC.cool Business access.
scan-failedNo tag was found in time, or the tag couldn't be read.
delivery-failedThe x-post request failed.
A page that waits for its own server, with the NDEF message too:
<a href="https://nfc.cool/x-callback-url/read-uid?x-get=https%3A%2F%2Fexample.com%2Fnfc%3Fcode%3Dabc123&ndef=1&state=7f3c9a">
Scan tag
</a>