Protect your online identity with TempPhoneNumber. Use our free temporary non-VoIP phone numbers to verify accounts on WhatsApp, Telegram, Google, and 3,000+ services without exposing your private info.
Live SMS Feed
Protect your online identity with TempPhoneNumber. Use our free temporary non-VoIP phone numbers to verify accounts on WhatsApp, Telegram, Google, and 3,000+ services without exposing your private info.
Live SMS Feed
Direct programmatic provisioning of real non-VoIP physical SIM phone lines. Instant OTP webhook callbacks, multi-step session reuse, and high-throughput telephony routing.
The temphonenumber API provides programmatic access to our carrier-grade physical SIM telephony network. All endpoints adhere to REST conventions, consume JSON request payloads, and enforce OAuth 2.0 Bearer token authorization.
Carrier SIM lines across major tier-1 networks for high OTP deliverability.
Receive SMS payloads via signed HTTPS callbacks or sub-150ms polling.
Unfulfilled activations or flagged lines automatically credit back to your balance.
Exchange your API Client ID and Client Secret for an OAuth2 Bearer Access Token. Pass Authorization: Bearer <token> on all authenticated requests.
Authorization: Bearer <token>client_idbodystringYour Developer API Client ID from Developer Settings.
cli_live_9482019348client_secretbodystringYour secret API key. Never expose in client code or public repositories.
grant_typebodystringThe OAuth 2.0 authorization grant type.
client_credentialsclient_credentialsscopebodystringSpace-delimited permission scopes.
*access_tokenstringtok_live_79a2f1c804b9e28dBearer authentication token to pass in headers.
token_typestringBearerAlways "Bearer".
expires_ininteger86400Token lifetime in seconds (86,400s / 24h).
scopestringstr:read str:write ltr:manageGranted permission scopes.
curl -X POST "https://api.temphonenumber.com/oauth/token" \
-H "Content-Type: application/json" \
-d '{
"client_id": "client_live_83920194",
"client_secret": "sec_live_99482019348",
"grant_type": "client_credentials"
}'{
"access_token": "tok_live_79a2f1c804b9e28d",
"token_type": "Bearer",
"expires_in": 86400,
"scope": "str:read str:write ltr:manage"
}Query available services, provision a physical SIM line, and retrieve the OTP via webhook or polling.
Retrieve the target websiteId, pricing, and stock count.
Purchase a line by websiteId and receive your order/parent ID.
Poll every 3–5 seconds or supply webhookUrl when purchasing.
Standard developer accounts are provisioned with 250 requests per minute.
Instead of polling GET /api/getNumber/{id}, pass webhookUrl in POST /api/buyNumbers to receive OTP events without using rate-limit quota.
Wallet balance is lower than line purchase cost.
No physical SIM lines available for the requested service/country.
Invalid or expired Bearer token.
Follow the Retry-After header before retrying.
Invalid query JSON filter/order or missing body field.
Activation window elapsed; credits refunded automatically.
Retrieve the paginated catalog of supported verification services, USD pricing, and available physical SIM inventory. Public endpoint — no authentication required.
limitqueryintegerNumber of services per page (1 - 100). Default is 20.
20cursorquerystringPagination cursor from previous pageInfo.endCursor.
filterquerystring (JSON)URL-encoded JSON object. Allowed fields: country (ISO-2), duration ("STR" | "LTR"), type ("SIM" | "ESIM"), isFavorite (boolean).
{"country":"US"}orderquerystring (JSON)URL-encoded JSON sort object. Allowed field: name with 1 (ASC) or -1 (DESC).
{"name":1}data.edges[].websiteIdstring69a13a4ef133cd20b4a7c082Unique service ID (pass to POST /api/buyNumbers).
data.edges[].namestringTelegramHuman-readable service title (e.g. Telegram, WhatsApp).
data.edges[].typestringSTRLine type ("STR" or "LTR").
data.edges[].durationstring15MINActivation window duration.
data.edges[].stockinteger842Ready physical SIM lines.
data.edges[].pricenumber (USD)0.50Cost in USD per verification.
data.edges[].region.iso2stringUSISO 3166-1 alpha-2 country code.
data.pageInfo.hasNextPagebooleantrueTrue if additional pages exist.
curl -X GET "https://api.temphonenumber.com/api/services?limit=10&filter=%7B%22country%22%3A%22US%22%7D"
{
"success": true,
"status": 200,
"data": {
"edges": [
{
"websiteId": "69a13a4ef133cd20b4a7c082",
"name": "Telegram",
"type": "STR",
"duration": "15MIN",
"stock": 842,
"price": 0.5,
"region": {
"iso2": "US",
"cc": "+1"
}
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "eyJuYW1lIjoiV2hhdHNBcHAifQ=="
}
}
}Returns supported countries where SMS verification lines are available, including ISO-3166 codes, dialing prefix (cc), active status, and regional state area masks.
data[].countryIdstring69a13a4ef133cd20b4a7c081Unique country identifier.
data[].namestringUnited StatesFull country name.
data[].iso2string (ISO 2)US2-letter ISO code (use in /api/services filter).
data[].iso3string (ISO 3)USA3-letter ISO code.
data[].ccstring+1International E.164 dialing prefix.
data[].isActivebooleantrueTrue if SIM inventory is active.
curl -X GET "https://api.temphonenumber.com/api/countries"
{
"success": true,
"message": "Countries retrieved successfully",
"status": 200,
"data": [
{
"countryId": "69a13a4ef133cd20b4a7c081",
"name": "United States",
"iso2": "US",
"iso3": "USA",
"cc": "+1",
"isActive": true
},
{
"countryId": "69a13a4ef133cd20b4a7c085",
"name": "United Kingdom",
"iso2": "GB",
"iso3": "GBR",
"cc": "+44",
"isActive": true
}
]
}Purchase one or more physical SIM numbers by websiteId. Returns a batch parent ID you can query with GET /api/getNumbers or supply webhookUrl for real-time OTP delivery.
Authorization: Bearer <token>servicesbodyarrayArray of purchase items ({ websiteId, quantity, webhookUrl? }).
successbooleantrueOrder confirmation status.
datastring69d4b8946fdb87c1f163e1c9Batch parentId to pass to GET /api/getNumbers.
statusinteger200HTTP status code.
curl -X POST "https://api.temphonenumber.com/api/buyNumbers" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"services": [
{
"websiteId": "69a13a4ef133cd20b4a7c082",
"quantity": 1,
"webhookUrl": "https://my-app.com/webhooks/sms"
}
]
}'{
"success": true,
"message": "Numbers purchased successfully",
"data": "69d4b8946fdb87c1f163e1c9",
"status": 200
}Returns a cursor-paginated list of purchased numbers associated with your account. Filter by batch parentId, country, type, duration, or status.
Authorization: Bearer <token>limitqueryintegerItems per page (1 - 100).
20cursorquerystringPagination cursor from pageInfo.endCursor.
filterquerystring (JSON)URL-encoded JSON filter object.
orderquerystring (JSON)URL-encoded JSON sort object ({ createdAt: -1 }).
data.edges[].orderIdstring69d4b90edb480636c33e23b9Unique order identifier.
data.edges[].numberstring (E.164)+14155552671Allocated phone number.
data.edges[].statusstringCOMPLETED"PENDING" | "COMPLETED" | "EXPIRED" | "CANCELLED".
data.edges[].typestringSTR"STR" or "LTR".
curl -X GET "https://api.temphonenumber.com/api/getNumbers?limit=20" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Numbers retrieved successfully",
"status": 200,
"data": {
"edges": [
{
"orderId": "69d4b90edb480636c33e23b9",
"number": "+14155552671",
"websiteId": "69d4b99e7c14080b83853167",
"websiteName": "Telegram",
"status": "COMPLETED",
"type": "STR",
"duration": "15MIN"
}
],
"pageInfo": {
"hasNextPage": false,
"endCursor": "cursor2"
}
}
}Fetch full details for a purchased number including status, incoming SMS OTP messages, and expiry timestamp.
Authorization: Bearer <token>idpathstringOrder identifier returned from POST /api/buyNumbers or GET /api/getNumbers.
69d4b90edb480636c33e23b9data.orderIdstring69d4b90edb480636c33e23b9Order identifier.
data.numberstring (E.164)+14155552671Allocated physical SIM phone number.
data.statusstringCOMPLETED"PENDING" | "COMPLETED" | "EXPIRED" | "CANCELLED".
data.typestringSTR"STR" or "LTR".
data.expireAtstring (ISO 8601)2026-04-07T11:00:00.000ZUTC timestamp when line expires.
curl -X GET "https://api.temphonenumber.com/api/getNumber/69d4b90edb480636c33e23b9" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Order retrieved successfully",
"status": 200,
"data": {
"orderId": "69d4b90edb480636c33e23b9",
"number": "+14155552671",
"websiteName": "Telegram",
"status": "COMPLETED",
"type": "STR",
"duration": "15MIN"
}
}Report a number not receiving SMS or already used to trigger an automatic store credit refund to your wallet balance.
Authorization: Bearer <token>idpathstringOrder ID of the number to cancel and refund.
69d4b90edb480636c33e23b9successbooleantrueConfirms refund event.
messagestringNumber flagged successfullyExecution status message.
databooleantrueAlways true on cancellation.
curl -X POST "https://api.temphonenumber.com/api/flagNumber/69d4b90edb480636c33e23b9" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Number flagged successfully",
"data": true,
"status": 200
}Request the same phone line again within its active validity window to receive a follow-up verification code.
Authorization: Bearer <token>idpathstringOrder ID of the number to reuse.
69d4b90edb480636c33e23b9data.orderIdstring69d4b90edb480636c33e23b9Reused order identifier.
data.numberstring (E.164)+14155552671Same phone number.
data.statusstringPENDINGReset to "PENDING" awaiting next SMS.
curl -X POST "https://api.temphonenumber.com/api/reuseNumber/69d4b90edb480636c33e23b9" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Number reused successfully",
"status": 200,
"data": {
"orderId": "69d4b90edb480636c33e23b9",
"number": "+14155552671",
"status": "PENDING",
"type": "STR"
}
}Enable or disable automatic renewal for a long-term rental (LTR) line from your wallet balance. Only applies to LTR orders.
Authorization: Bearer <token>idpathstringThe order ID of the long-term rental number.
69d4b90edb480636c33e23b9databooleantrueConfirms toggle state.
successbooleantrueConfirms execution.
messagestringAuto-renewal enabled successfullyConfirmation message.
curl -X PUT "https://api.temphonenumber.com/api/renewLTRNumber/69d4b90edb480636c33e23b9" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Auto-renewal enabled successfully",
"data": true,
"status": 200
}Verify X-temphonenumber-Signature and X-temphonenumber-Timestamp using HMAC-SHA256 and crypto.timingSafeEqual.
import crypto from 'crypto';
import express from 'express';
const app = express();
app.use(express.json({ verify: (req, _res, buf) => { req.rawBody = buf; } }));
app.post('/webhooks/temphonenumber', (req, res) => {
const signature = req.headers['x-temphonenumber-signature'];
const timestamp = req.headers['x-temphonenumber-timestamp'];
const webhookSecret = process.env.TEMP_PHONE_WEBHOOK_SECRET;
const signedPayload = `${timestamp}.${req.rawBody}`;
const expectedSig = crypto
.createHmac('sha256', webhookSecret)
.update(signedPayload)
.digest('hex');
const isValid = crypto.timingSafeEqual(
Buffer.from(signature, 'hex'),
Buffer.from(expectedSig, 'hex')
);
if (!isValid) return res.status(401).send('Invalid signature');
if (req.body.event === 'sms.received') {
console.log('OTP received:', req.body.code, 'for line:', req.body.phoneNumber);
}
res.status(200).json({ received: true });
});import axios from 'axios';
const api = axios.create({
baseURL: 'https://api.temphonenumber.com',
headers: { Authorization: `Bearer ${process.env.TEMP_PHONE_TOKEN}` },
});
const { data: orderId } = await api.post('/api/buyNumbers', {
services: [{ websiteId: '69a13a4ef133cd20b4a7c082', quantity: 1 }],
});import os, requests
res = requests.post(
'https://api.temphonenumber.com/api/buyNumbers',
headers={'Authorization': f"Bearer {os.environ['TEMP_PHONE_TOKEN']}"},
json={'services': [{'websiteId': '69a13a4ef133cd20b4a7c082', 'quantity': 1}]},
)
print(res.json())curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://api.temphonenumber.com/api/buyNumbers -d '{"services":[{"websiteId":"69a13a4ef133cd20b4a7c082","quantity":1}]}'