English
Receiving LINE SMS codes on OTP Route numbers: checklist and steps
A team receives a LINE verification code with OTP Route by ordering a one-time number for the linemessenger service in the OTP Gateway, entering it on LINE's registration or login screen, and reading the code from the dashboard or a signed webhook. Pricing starts at $0.20 per code, and if nothing arrives within the 20-minute window the charge returns to your wallet automatically.
What does LINE use a phone number for?
LINE ties an account to a phone number. A new registration is confirmed with an SMS code, and the app may ask for the number again when the account is moved to a new device or when someone signs in after reinstalling. The number also plays a part in recovering access, so it matters which number an account was created with.
That last point shapes your choice of product: a one-time number suits a single verification step, while an account that must sign in again months later needs a number you still control.
Pre-flight checklist before ordering a LINE number
- An API key from the Developer console (prefix
or_live_); up to 10 keys per account. - Enough wallet balance, confirmed with
GET /api/v1/balance. - A country chosen to match the market of the account or test case.
- A live price lookup for that pair, because prices vary by country.
- A webhook endpoint registered and its signature check tested, or a polling loop ready.
- A decision on whether this account must log in again later; if yes, read the Dedicated Number section below.
- A quick re-read of LINE's terms for the account type you are creating.
Which countries can I pick for LINE, and why does it matter?
The LINE service is available in 197 countries. The app has its strongest user bases in parts of East and Southeast Asia, so teams launching there often start with Japan, Thailand, Taiwan, Indonesia, Hong Kong or Malaysia. Other options include Singapore, the Philippines, Vietnam, South Korea, Australia, the United States, the United Kingdom, Germany, Brazil and Romania.
Pick the country your real users come from. A Thai-market build should be verified with a Thai number so the country code, phone formatting and any regional onboarding screens behave as they will in production. Covering several markets costs little extra effort, because only the country value changes between runs.
Step by step: the LINE verification code API flow
- Call
GET /api/v1/prices?country=<id>&service=linemessengerand confirm the route is available. - Create the activation with
POST /api/v1/activationsand a body such as{"service": "linemessenger", "country": "th"}. - Enter the returned number on LINE's phone verification screen.
- Wait for
activation.sms_received, or pollGET /api/v1/activations/{id}every few seconds within the 300 requests per minute limit. - If the run is abandoned, call
POST /api/v1/activations/{id}/cancel.
Endpoint details are in the developer docs.
How should the webhook handler treat LINE events?
Read the X-OTPRoute-Signature header, formatted t=<unix>,v1=<hex>, compute HMAC-SHA256 over <t>.<raw body> with the endpoint secret, compare in constant time, and drop anything with an old timestamp. Then key your processing on the activation id, so a retried delivery updates the same record instead of firing your test step twice. Treat activation.expired and activation.cancelled as clean outcomes in the same table. The HMAC guide has a full walkthrough.
Ordering a LINE number from the dashboard
Sign in, open the OTP Gateway, choose LINE and a country, check the price shown and order. Type the number into LINE, then keep the activation card open; the code appears there once received. Product managers and support agents often use this view to check a localized LINE onboarding screen by hand before the automated suite takes over. The same 20-minute window and refund rule apply.
Troubleshooting: why a LINE code may not arrive
LINE may refuse some virtual numbers, and a route that worked earlier can be unavailable later in the day. If no SMS lands, the activation is refunded in full when the window closes or when you cancel. After that:
- try another country that still fits the test case;
- retry later rather than re-ordering in a tight loop;
- confirm the number was entered with the right country code.
When is a Dedicated Number the better fit for LINE?
If a staging account or a shared team login must keep signing in, a one-time number is the wrong tool. Dedicated Numbers in the United States and Canada start at $1.95/month, receive inbound SMS in the dashboard and on your webhook via number.sms_received, and renew from the wallet until you release them. Details are on the virtual numbers page.
Use OTP Route only for your own legitimate products and accounts: one account per real person or business, LINE's terms respected, and the Acceptable Use Policy followed.
Frequently asked questions
What service id does OTP Route use for LINE?
The id is linemessenger. Use it in the prices query and the service field when creating an activation.
Can I do LINE SMS verification for testing without a physical SIM?
Yes. An OTP Gateway number receives the LINE code, which you read through the API, a webhook or the dashboard.
Which country should I choose for a virtual number for LINE?
Choose the market your users or test case belong to, for example Japan or Thailand for a launch there.
Will LINE accept every OTP Route number?
Not always. LINE may reject some virtual numbers, and when no code arrives you are refunded automatically.
How much does it cost to receive a LINE OTP?
From $0.20 per code, depending on the country; the live price comes from GET /api/v1/prices.
Can I keep the same LINE phone number for later logins?
Only with a Dedicated Number, which is available in the US and Canada. One-time numbers are for a single code.
Do I need a webhook to receive LINE OTP codes, or is polling enough?
Polling GET /api/v1/activations/{id} works well for small runs. Webhooks scale better once many activations run in parallel.
Service names are trademarks of their respective owners. OTP Route is not affiliated with them. Use numbers lawfully, follow each service's terms and our Acceptable Use Policy.