Access public SIM cards and messages programmatically. No authentication required. Perfect for developers building integrations and automation tools.
Base URL for all API requests
https://www.otpocket.app/api/publicAll endpoints are prefixed with this base URL. No API key or authentication is required.
Get a list of all available public SIM cards with their status and carrier information.
https://www.otpocket.app/api/public/simsFilter by status: active, idle, or offline
Filter by carrier name (partial match)
Number of results (default: 100, max: 500)
Pagination offset (default: 0)
curl "https://www.otpocket.app/api/public/sims?status=active&limit=50"{
"success": true,
"data": [
{
"number": "+639123456789",
"carrier": "Smart",
"status": "active",
"device_id": "device-123",
"device_name": "Device 1"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"total": 150,
"has_more": true
}
}Ready-to-use code snippets in different programming languages
// List all active public SIMs
const response = await fetch('https://www.otpocket.app/api/public/sims?status=active');
const data = await response.json();
console.log(data.data);
// Get messages for a specific SIM
const messages = await fetch('https://www.otpocket.app/api/public/sims/09123456789/messages');
const messagesData = await messages.json();
console.log(messagesData.data);All endpoints return errors in a consistent format
{
"success": false,
"error": "Error type",
"message": "Detailed error message"
}All endpoints are rate limited to ensure fair usage
Note: Rate limits are stored in the database and can be adjusted by administrators. Different endpoints may have different limits. Check the response headers for current limits.
Every response includes rate limit information in headers:
{
"success": false,
"error": "Rate limit exceeded",
"message": "Rate limit exceeded. Maximum 10 requests per minute. Please try again later.",
"retry_after": 45
}HTTP Status: 429 Too Many Requests
When you receive a 429 response, implement exponential backoff retry logic:
// Example: Fetch with exponential backoff
async function fetchWithRetry(url, maxRetries = 3) {
let delay = 1000; // Start with 1 second
for (let attempt = 0; attempt <= maxRetries; attempt++) {
const response = await fetch(url);
if (response.status !== 429) {
return response; // Success or other error
}
if (attempt === maxRetries) {
return response; // Return 429 on last attempt
}
// Get Retry-After header or use exponential backoff
const retryAfter = response.headers.get('Retry-After');
const waitTime = retryAfter
? parseInt(retryAfter) * 1000
: Math.min(delay * 2, 30000); // Max 30 seconds
console.log(`Rate limited. Retrying after ${waitTime}ms...`);
await new Promise(resolve => setTimeout(resolve, waitTime));
delay = waitTime;
}
}
// Usage
const response = await fetchWithRetry('https://www.otpocket.app/api/public/sims');
const data = await response.json();Have questions or need assistance with the API?