LFRelay
Home/Guides/Long-lived SMS API guide
LFRELAY GUIDE

Long-lived SMS API guide

Every active number has one ready-to-use private API link. There are no formats or extra parameters to configure: copy the link after purchase and read it from your authorized system.

1. Copy the API link after purchase

Sign in, open Active Numbers or Order History, locate the number and select Copy API. The URL is already bound to the correct order and number.

  1. Choose a country, service, validity tier and available prefix.
  2. Confirm the final price shown at checkout.
  3. Select Copy API on the active-number card.
  4. Store the URL in a protected server-side configuration.

2. Read the response directly

Send an HTTP GET request to the private URL. The default JSON response contains the current status, latest code, code timestamp and number expiry time.

GET https://lfrelay.com/api/v1/receive/YOUR_PRIVATE_TOKEN

{
  "code": 1,
  "msg": "ok",
  "data": {
    "status": "waiting",
    "code": null,
    "code_time": null,
    "expired_date": "2026-12-31 23:59:59"
  }
}

3. Poll about once every 60 seconds

A 60-second interval is suitable for normal workflows and avoids unnecessary requests. Receiving one message does not remove the number; the same URL continues to work while the order remains active.

  • waiting: no new message yet; check again later.
  • received: store the code and timestamp.
  • expired or unavailable: stop polling and review the order.
  • network error: retry with increasing delay rather than rapid loops.

4. Protect the link like a password

Anyone holding the private URL may read results for that number. Keep it in a controlled server environment and never expose it in public pages, screenshots, group chats or source repositories.

  • Do not hard-code it in browser JavaScript.
  • Redact full URLs and tokens from logs.
  • Grant staff only the access required for their role.
  • If exposed, stop using it and contact support@lfrelay.com.
LIVE RESOURCE SNAPSHOT

Public data synchronized from the current catalog

Countries, services and stock refresh on a scheduled cache. Public pages do not display exact prices; sign in to view the current quote before purchase.

Loading the live catalog…
FAQ

Frequently asked questions

Do I need to assemble query parameters?

No. The dashboard link is already bound to the order and is ready to copy.

Can the number receive more messages after the first code?

Yes. It remains active until expiry, cancellation or a resource-status change.

Can I share the URL with a customer?

Only with an authorized person who genuinely needs access, and only through a secure channel.